Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

This is my first post here :D.....

 

i have this problems with timer and threads

 

ex :

 

i have timer named timer1 in Form1.

 

in Keydown event i set timer1.Enabled = true.

 

the problems occur when i press the key for a while and..

 

what's happen?? timer1 is stopped dunno what happen it's just stopped the same thing happen when i have Thread instead of Timer

 

 

can anybody explain this to me....

Posted

my plan is when i push a key... i start a thread/timer then when keyUp i stop it.

So this timer/thread has to run while i press a key but what i got here is... it run for a while and then stop....

 

so can't use KeyUp event :(

Posted
Are you using the same key each time? If so, try another one (it might be a keyboard issue). You could replace the code in your timer with the Beep() function, change the interval to 100, and check to see if the time it takes to stop is always the same or if a pattern appears.
Posted

sorry guys...

i think i know what the problem is. when keydown i start the thread over and over and over :eek:

 

so i just give some flag and zapp.....!!! it works :D

 

Photovoltaic : yes it stop with same pattern

 

 

thank you for all the answer it means a lot ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...