Results 1 to 2 of 2

Thread: [RESOLVED] Hotkey Help

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Location
    Pasco, WA
    Posts
    4

    Resolved [RESOLVED] Hotkey Help

    I'm making a program, and this is probably easier than I am thinking but I need help. I am trying to use F11 to activate Button3. To perform a click. If Keys.F8 is pressed, it makes button 3 activate. WHat I'm doing is making it so a window becomes 100% Opaque when you press a button. And if possible, can I have help with making it also press another button every other time? Like have F11 be an on/off button.

    EDIT:

    I have solved the issue. Code for anybody who wants to know:

    Code:
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
            Dim Hotkey1 As Boolean
            Hotkey1 = GetAsyncKeyState(Keys.F11)
            If Hotkey1 = True Then
                Button3.PerformClick()
            End If
        End Sub
    Last edited by QuintonStevens; Mar 21st, 2011 at 08:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width