扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Private Sub Form_Load() App.HelpFile = app.path & "\help.chm" '调用与主程序同目录下的help.chm帮助文件,按F1键调用 End Sub |
Private Sub Form_Load() App.HelpFile = app.path & "\help.chm" End Sub private Sub CmdHelp_Click() SendKeys "{F1}" '发送击键到活动窗口 End Sub |
private Sub CmdHelp_Click() Shell "hh.exe help.chm", vbNormalFocus 'help.chm为指定的帮助文件,可包含路径。 End Sub |
Option Explicit Private Declare Function HtmlHelpA Lib "hhctrl.ocx" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal dwData As Long) As Long 'hwndCaller指定调用者的窗口,pszFile指定要调用的文件,uCommand是发送给 HtmlHelp的命令,dwData是uCommand的参数。 |
private Sub CmdHelp_Click() dim i as string i = app.path & "\help.chm" '用变量i记录与主程序同目录下的help.chm帮助文件 HtmlHelpA Form1.hWnd, i, 0, 0 End Sub |
Option Explicit '声明API函数用于异步打开一个文档 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL = 1 |
private Sub CmdHelp_Click() dim a as long Dim b As String b = App.Path & "\help.chm" '用变量b记录与主程序同目录下的help.chm帮助文件 a = ShellExecute (0, "open", b, "", "", SW_SHOWNORMAL) End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者