Cant Disable Right Window Logo Key
-
Hi, i cant disable the right window logo keys when i run my application. i use the following code to disable the window logo keys, but it just can disable left window logo key. private sub Textbox1_KeyDown(Byval sender as object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown if e.keycode=keys.LWin and e.keycode=Keys.RWin then e.handled=true end if end sub Pls Help me...:(
-
Hi, i cant disable the right window logo keys when i run my application. i use the following code to disable the window logo keys, but it just can disable left window logo key. private sub Textbox1_KeyDown(Byval sender as object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown if e.keycode=keys.LWin and e.keycode=Keys.RWin then e.handled=true end if end sub Pls Help me...:(
How about changing your If statement to 'OR':
If e.KeyCode=Keys.LWin Or e.KeyCode=Keys.RWin Then
Dave Kreskowiak Microsoft MVP - Visual Basic
-
How about changing your If statement to 'OR':
If e.KeyCode=Keys.LWin Or e.KeyCode=Keys.RWin Then
Dave Kreskowiak Microsoft MVP - Visual Basic
-
still cannot disable the right window logo key.
If e.KeyCode=Keys.RWin Then
code here also just allow me to disable the left window logo key.You might want to set a breakpoint on that If statement and see if its even being called when you hit that key. If it is, then you can peek at the
e.KeyCode
to see what value it holds. Then you can change the code to look for that value. Be warned! Not every keyboard has 2 Windows logo keys.Dave Kreskowiak Microsoft MVP - Visual Basic