|
-
Nov 24th, 2016, 10:09 PM
#1
Thread Starter
New Member
I want to make a counter program that i cna run in the background
When i press i button i want the counter to go up by one. I already have this code but i need it to run when i'm not on the selected window. Say i'm in chrome or another window. Thank you
Just in case you want the counter code here it is:
Public Class Form1
Dim Counter As Integer
Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.ControlKey
Counter += 1
Case Keys.R
Counter = 0
Label2.Text = ""
TextBox1.Enabled = True
Button1.Enabled = True
TextBox1.Show()
Button1.Show()
End Select
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label1.Text = Counter
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label2.Text = TextBox1.Text
TextBox1.Enabled = False
Button1.Enabled = False
TextBox1.Hide()
Button1.Hide()
End Sub
End Class
Last edited by Shamac01; Nov 25th, 2016 at 01:12 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|