如何在我的vb.net项目中使用功能键 [英] how to use function keys in my vb.net project
本文介绍了如何在我的vb.net项目中使用功能键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在我的项目中使用f1之类的功能键,而不是vb帮助,而是我在项目中提供的帮助.
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.
推荐答案
HelpRequested
事件可用于此目的,如此处所述
Control.HelpRequested事件 [
TheHelpRequested
event can be used for this purpose as explained here
Control.HelpRequested Event[^]
VB.NET Windows应用程序中的捕获功能键
以下代码段可能会帮助您捕获VB.NET应用程序中的功能键(F1至F12)
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
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
这篇关于如何在我的vb.net项目中使用功能键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文