1 Replies - 242 Views - Last Post: 30 September 2012 - 06:02 AM Rate Topic: -----

#1 Nkenny94  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 29-September 12

KeyStroke for switch form help!

Posted 30 September 2012 - 05:29 AM

I don't get any error, but when i press the Esc it doesn't work. I don't know what I missing or things that i done wrong.

    Private Sub Pwpro_KeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
        If e.KeyCode = Keys.Escape Then
            Me.Hide()
            uneM.Show()
        End If
    End Sub


Private Sub Button12_Click(sender As System.Object, e As System.EventArgs) Handles Button12.Click
        Me.Hide()
        uneM.Show()
    End Sub
End Class


Is This A Good Question/Topic? 0
  • +

Replies To: KeyStroke for switch form help!

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: KeyStroke for switch form help!

Posted 30 September 2012 - 06:02 AM

Make sure you set the forms KeyPreview Property to True or your keystrokes for the form will be ignored.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1