Click here to Skip to main content
15,915,065 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralRe: Calling Alfred Jayaprakash Pin
Anonymous2-Sep-05 6:57
Anonymous2-Sep-05 6:57 
GeneralRe: Calling Alfred Jayaprakash Pin
toxcct2-Sep-05 22:43
toxcct2-Sep-05 22:43 
GeneralRe: Calling Alfred Jayaprakash Pin
User 5838526-Sep-05 17:41
User 5838526-Sep-05 17:41 
GeneralReq for VSS Command Line Help Pin
Susan Hernandez17-Aug-05 13:32
Susan Hernandez17-Aug-05 13:32 
GeneralRequest for pagemanager article Pin
Gunmen15-Aug-05 0:53
Gunmen15-Aug-05 0:53 
GeneralYahoo Skinned Application C#.Net Pin
| Muhammad Waqas Butt |14-Aug-05 3:31
professional| Muhammad Waqas Butt |14-Aug-05 3:31 
GeneralTime Scheduled In C#.Net Pin
| Muhammad Waqas Butt |14-Aug-05 3:26
professional| Muhammad Waqas Butt |14-Aug-05 3:26 
GeneralRe: Time Scheduled In C#.Net Pin
ediazc30-Aug-05 19:24
ediazc30-Aug-05 19:24 
Use a timer (System.Timers.Timer), and check DateTime.Now for time.



public class TimerExample
{

static bool EnableEvent = true;
static TimeSpan ElapsedTime;
static DateTime StartTime = DateTime.Now;

public static void Main()
{
// Create a new Timer with Interval set to 60 seconds.
System.Timers.Timer aTimer = new System.Timers.Timer(60000);
aTimer.Elapsed+=new ElapsedEventHandler(OnTimedEvent);
// Only raise the event the first time Interval elapses.
aTimer.AutoReset = false;
aTimer.Enabled = true;

Console.WriteLine("Press \'q\' to quit the sample.");
while(Console.Read()!='q');
}

// Specify what you want to happen when the event is raised.
private static void OnTimedEvent(object source, ElapsedEventArgs e)
{
ElapsedTime = DateTime.Now - StartTime;
if (DateTime.Now.Hour >= 22 && DateTime.Now.Hour <= 23)
{
if (EnableEvent)
{
ProcessYourEvent();
EnableEvent = false;
}
}
if (DateTime.Now.Hour > 22)
{
EnableEvent = true;
}
}
}


Eduardo Diaz

site | english blog | spanish blog
QuestionWhat all tools available for upgrade vb6.0 to vb.net, apart from migrate tool, which comes with .NET IDE Pin
Shiby9-Aug-05 20:45
Shiby9-Aug-05 20:45 
AnswerRe: What all tools available for upgrade vb6.0 to vb.net, apart from migrate tool, which comes with .NET IDE Pin
Shimron7-Sep-05 20:22
Shimron7-Sep-05 20:22 
GeneralEditing with datagrid Pin
Haneeshkb7-Aug-05 18:41
Haneeshkb7-Aug-05 18:41 
GeneralLDAP VBSCRIPT - Urgent request Pin
keerthi kamalapuri4-Aug-05 8:34
susskeerthi kamalapuri4-Aug-05 8:34 
GeneralRe: LDAP VBSCRIPT - Urgent request Pin
Anonymous8-Sep-05 11:35
Anonymous8-Sep-05 11:35 
GeneralVery Urgent Pin
Member 275254630-Jul-05 5:14
Member 275254630-Jul-05 5:14 
GeneralRe: Very Urgent Pin
Serge Calderara2-Aug-05 7:26
Serge Calderara2-Aug-05 7:26 
GeneralCalling DSQUERY.DLL from Windows Forms app Pin
Phil Street29-Jul-05 1:15
Phil Street29-Jul-05 1:15 
GeneralRe: web based exam application Pin
Dan Neely28-Jul-05 10:19
Dan Neely28-Jul-05 10:19 
GeneralImage File Security Pin
thealca26-Jul-05 18:54
thealca26-Jul-05 18:54 
GeneralRe: Image File Security Pin
Trollslayer15-Aug-05 4:50
mentorTrollslayer15-Aug-05 4:50 
GeneralRe: Image File Security Pin
Marcello Cantelmo27-Aug-05 3:23
Marcello Cantelmo27-Aug-05 3:23 
GeneralRe: Image File Security Pin
thealca29-Aug-05 14:16
thealca29-Aug-05 14:16 
Questiondll Locking Detector? Pin
Susan Hernandez26-Jul-05 13:56
Susan Hernandez26-Jul-05 13:56 
AnswerRe: dll Locking Detector? Pin
Vasudevan Deepak Kumar26-Jul-05 18:38
Vasudevan Deepak Kumar26-Jul-05 18:38 
GeneralRe: dll Locking Detector? Pin
Susan Hernandez27-Jul-05 6:01
Susan Hernandez27-Jul-05 6:01 
GeneralImage format conversion Pin
Syed Mazhar Hasan26-Jul-05 12:07
sussSyed Mazhar Hasan26-Jul-05 12:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.