keycode?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
Hello,
Love the new look codenstuff
i want to access Control + Alt + F1
but can't manage it
only works for 2 keycode noet 3 :(
any help please?
]code]
'Help
If (e.KeyCode = Keys.F1 AndAlso e.Modifiers = Keys.Control) Then
MsgBox("Ctrl+F1 for Help")
End If
'About
If (e.KeyCode = Keys.F1 AndAlso e.Modifiers = Keys.Control AndAlso e.Alt) Then
MsgBox("Ctrl+Alt+F1 for Help")
End If
[/code]
Search on Google but didn't find the solution
Thanks
Love the new look codenstuff

i want to access Control + Alt + F1
but can't manage it
only works for 2 keycode noet 3 :(
any help please?
]code]
'Help
If (e.KeyCode = Keys.F1 AndAlso e.Modifiers = Keys.Control) Then
MsgBox("Ctrl+F1 for Help")
End If
'About
If (e.KeyCode = Keys.F1 AndAlso e.Modifiers = Keys.Control AndAlso e.Alt) Then
MsgBox("Ctrl+Alt+F1 for Help")
End If
[/code]
Search on Google but didn't find the solution
Thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Try:
Code: Select all
Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
If e.Control And e.Alt And e.KeyCode = Keys.F1 Then
MsgBox("Ctrl+Alt+F1 for Help")
End If
End Sub
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
seems weird, but when we use a character with control and alt it works fine
but when we use it with f1 its not working
but when we use it with f1 its not working

Code: Select all
If e.Control And e.Alt And e.KeyCode = Keys.F1 Then
MsgBox("Ctrl+Alt+F1 for Help") ' not working
End If
Code: Select all
do someone has a clue??If e.Control And e.Alt And e.KeyCode = Keys.G Then
MsgBox("Ctrl+Alt+G for Help") ' working :darnit;
End If
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
I'm not sure why it's not working for you but the code I posted works fine for me.
Are you capturing keys anywhere else within your application?
Are you capturing keys anywhere else within your application?
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
no, just on the main form.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023