Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
JokeRe: Observations between VB.NET and VC#.NET? Pin
Vasudevan Deepak Kumar28-May-08 2:42
Vasudevan Deepak Kumar28-May-08 2:42 
AnswerNope. Pin
CPallini28-May-08 2:33
mveCPallini28-May-08 2:33 
QuestionDriver Pin
Pankaj Sardana28-May-08 1:32
Pankaj Sardana28-May-08 1:32 
AnswerRe: Driver Pin
benjymous28-May-08 1:37
benjymous28-May-08 1:37 
AnswerRe: Driver Pin
Sam Xavier28-May-08 23:11
Sam Xavier28-May-08 23:11 
QuestionHow to get a popup in Window Application Pin
Member 369905328-May-08 1:20
Member 369905328-May-08 1:20 
AnswerRe: How to get a popup in Window Application Pin
leppie28-May-08 1:27
leppie28-May-08 1:27 
Questionusing timer to switch an alert on and off Pin
steve_rm28-May-08 0:51
steve_rm28-May-08 0:51 
Hello,

VS 2008

I have the following code in my timer control

<br />
private void tmrVibrate_Tick(object sender, EventArgs e)<br />
        {<br />
            vibrateAlert = new Led();<br />
            vibrateAlert.SetLedStatus(1, Led.LedState.On);<br />
            Debug.WriteLine("Vibrating");<br />
            Thread.Sleep(1000);<br />
            vibrateAlert.SetLedStatus(1, Led.LedState.Off);<br />
        }<br />

I have 2 buttons start and stop. Start will enable the timer and stop will disable the timer.

The problem was that the PDA would continuely vibrate. So I put it in the timer event and set the interval for 2 seconds. Then in the timer event I sleep for 1 second. This will vibrate it for 1 second then switch it off and do this every 2 seconds.

The problem now is, that the UI will freeze during the pause of 1 second.

Is there a better way to do this?

Many thanks for any advice,
AnswerRe: using timer to switch an alert on and off Pin
leppie28-May-08 1:17
leppie28-May-08 1:17 
QuestionRe: using timer to switch an alert on and off Pin
steve_rm28-May-08 16:15
steve_rm28-May-08 16:15 
QuestionHow do I Convert a byte array to a IPAddress? Pin
Zig15828-May-08 0:32
Zig15828-May-08 0:32 
AnswerRe: How do I Convert a byte array to a IPAddress? Pin
Giorgi Dalakishvili28-May-08 0:41
mentorGiorgi Dalakishvili28-May-08 0:41 
GeneralRe: How do I Convert a byte array to a IPAddress? Pin
Zig15828-May-08 15:39
Zig15828-May-08 15:39 
AnswerRe: How do I Convert a byte array to a IPAddress? Pin
dan!sh 28-May-08 0:44
professional dan!sh 28-May-08 0:44 
Questionchanging resolution (dpi) Pin
stephan_00728-May-08 0:22
stephan_00728-May-08 0:22 
AnswerRe: changing resolution (dpi) Pin
leppie28-May-08 3:12
leppie28-May-08 3:12 
QuestionAborting a running procedure Pin
WebMaster27-May-08 23:49
WebMaster27-May-08 23:49 
AnswerRe: Aborting a running procedure Pin
Christian Graus27-May-08 23:51
protectorChristian Graus27-May-08 23:51 
AnswerRe: Aborting a running procedure Pin
Colin Angus Mackay27-May-08 23:53
Colin Angus Mackay27-May-08 23:53 
GeneralRe: Aborting a running procedure Pin
WebMaster28-May-08 0:00
WebMaster28-May-08 0:00 
GeneralRe: Aborting a running procedure Pin
Bijesh28-May-08 0:49
Bijesh28-May-08 0:49 
GeneralRe: Aborting a running procedure Pin
WebMaster28-May-08 0:55
WebMaster28-May-08 0:55 
QuestionHelp in calling form Pin
Saiyed Alam27-May-08 23:13
Saiyed Alam27-May-08 23:13 
AnswerRe: Help in calling form Pin
Gareth H27-May-08 23:39
Gareth H27-May-08 23:39 
AnswerRe: Help in calling form Pin
Mandaar Kulkarni28-May-08 1:22
Mandaar Kulkarni28-May-08 1:22 

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.