Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

VS 2008 Some easy, non CPU eating wait function ,or empty timer

$
0
0
Hi !
I got a program with hotkeys, and i want to make a delay after some hotkey code is executed.I know i can make it with timer, but i dont know how, when i set timers interval for example to 1000 (1 sec) and inside this timer i put Timer1.Enabled = false (to turn it off when its done) it doesnt work at all, it doesnt wait :(
And i need to wait some time, because as you probably know hotkeys need to be in a timer, and when i press some hotkey (key+key) then GetAsyncKeyState function may detect it like i press it few times, because the timer is very fast.Is there some way to make a delay and stop the timer when the hotkey code is executed ?

Viewing all articles
Browse latest Browse all 27189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>