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

VS 2008 SendKeys.Send with countdown

$
0
0
Hi !
I want to make a program that will SendKeys with a countdown, that would be turned on by pressing 1 and turned off by pressing 2.I know pretty everything and i almost made it, however i dont know how to make the countdown.I have tried this:
Code:

Private Sub countdwn_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles countdwn.Tick
        Dim count As Integer
        count = count + 1
        SendKeys.Send("Countdown: " & count & " :{)}" & "{Enter}")
    End Sub

countdwn timer has set interval to 1000 (1 second)
It works, however when i start the program and press 1 in notepad (i know how to make hotkeys) it types the message succesfully but it doesnt add 1 to "count" and the message looks always like this:
Quote:

Countdown: 1 :)
Countdown: 1 :)
Countdown: 1 :)
etc...
How can i fix this so it will be a working countdown ?

Viewing all articles
Browse latest Browse all 27329

Trending Articles



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