Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Community
Technology
Technology Q&A
Visual Basic Help (Hotkeys)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Trill" data-source="post: 229455" data-attributes="member: 35388"><p>Here's the code I'm using:</p><p></p><p>[CODE]Public Class Form1</p><p></p><p> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click</p><p> Timer1.Enabled = True</p><p> End Sub</p><p></p><p> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click</p><p> Timer1.Enabled = False</p><p> End Sub</p><p></p><p> Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick</p><p> SendKeys.Send(TextBox1.Text())</p><p> SendKeys.Send("{Enter}")</p><p> End Sub</p><p></p><p> Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer</p><p></p><p>End Class[/CODE]</p><p></p><p>Here's my design:</p><p><img src="http://puu.sh/4hRRH.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>As you can see I've added the line you said above. Now, would I be adding it like this?</p><p></p><p>[CODE]</p><p>Public Class Form1</p><p></p><p> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click</p><p> Timer1.Enabled = True</p><p> End Sub</p><p></p><p> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click</p><p> Timer1.Enabled = False</p><p> End Sub</p><p></p><p> Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick</p><p> SendKeys.Send(TextBox1.Text())</p><p> SendKeys.Send("{Enter}")</p><p> End Sub</p><p></p><p> Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer</p><p> If GetKeyPress(Keys.F4)</p><p> MsgBox("You pressed F4!");</p><p>End If</p><p>End Class</p><p>[/CODE]</p><p></p><p>Or? Basically I'm wanting the top/start button to be stopped/started using F4 and F5.</p></blockquote><p></p>
[QUOTE="Trill, post: 229455, member: 35388"] Here's the code I'm using: [CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Enabled = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Enabled = False End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send(TextBox1.Text()) SendKeys.Send("{Enter}") End Sub Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer End Class[/CODE] Here's my design: [IMG]http://puu.sh/4hRRH.png[/IMG] As you can see I've added the line you said above. Now, would I be adding it like this? [CODE] Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Enabled = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Enabled = False End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send(TextBox1.Text()) SendKeys.Send("{Enter}") End Sub Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer If GetKeyPress(Keys.F4) MsgBox("You pressed F4!"); End If End Class [/CODE] Or? Basically I'm wanting the top/start button to be stopped/started using F4 and F5. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Community
Technology
Technology Q&A
Visual Basic Help (Hotkeys)
Top