Click here to Skip to main content
15,912,292 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how i can use function keys like f1 for my project not vb help but the help that i have provided in project. how i can use function keys in my vb.net forms.
Posted
Updated 11-Apr-12 23:26pm
v2
Comments
kishore sharma 12-Apr-12 4:16am    
Can you please make it clear.

The HelpRequested event can be used for this purpose as explained here
Control.HelpRequested Event[^]
 
Share this answer
 
Comments
sankyn1 12-Apr-12 4:18am    
i have to use function keys like f1 for to see my help
sankyn1 12-Apr-12 4:21am    
suppose i have a vb.net project in that i have to use function keys of my project like if user presss f1 than than my help should be displayed
VJ Reddy 12-Apr-12 4:32am    
Please read the documentation at the link given in the solution.
When the user presses the F1 key HelpRequested event will be raised, in which the help can be handled.
Capture Function Keys in VB.NET Windows Application

The following snippet might help you in capturing the Function Keys (F1 to F12) in a VB.NET application

VB
Private Sub frmWinSamAppMain_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        ' -- Sample Code for http://DotNetDud.BlogSpot.com
        Select Case e.KeyCode
            Case Keys.F1
                MessageBox.Show("Help is on the way")
            Case Keys.F5
                RefreshMethod()
            Case Keys.F9
                MessageBox.Show("You have pressed F9")
        End Select
    End Sub
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900