help help 帮助文件的加入 (高分)
你好,请问在VB里怎样加入帮助文件,帮助文件我已经做好了,可不知怎么加到程序里面。 其次是,像优化大师这样的软件界面怎么做啊。 报表什么地方可以找到啊!
谢谢了!
问题点数:80、回复次数:5Top
1 楼tulip_hui(maple)回复于 2002-05-30 17:21:49 得分 20
'add the help file the the project
'an example of it
'the flowing is used in the application of help file.
Const HELP_CONTEXT = &H1
Const HELP_QUIT = &H2
Const HELP_INDEX = &H3
Const HELP_CONTENTS = &H3&
Const HELP_HELPONHELP = &H4
Const HELP_SETINDEX = &H5
Const HELP_SETCONTENTS = &H5&
Const HELP_CONTEXTPOPUP = &H8&
Const HELP_FORCEFILE = &H9&
Const HELP_KEY = &H101
Const HELP_PARTIALKEY = &H105&
Const HELP_MULTIKEY = &H201&
Const HELP_SETWINPOS = &H203&
Private Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
Private Sub mnuTopic_Click()
App.HelpFile = App.Path + "\help\efuhelp.chm"
mnuTopic.HelpContextID = 1
SendKeys "{F1}", True
End Sub
Top
2 楼HeatLoad(热负荷)回复于 2002-05-30 17:25:22 得分 20
方法1)
Shell gsWindowDir & "\hh.exe " & gsSystemdir & "\shine.chm", vbNormalFocus
方法2)
Private Declare Function htmlhelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndcaller As Long, ByVal pszfile As String, ByVal ucommand As Long, ByVal dwdata As Long) As Long
private sub command1_click()
htmlhelp Me.hWnd, App.Path & "\help.chm", 0, 0
end sub
Top
3 楼ILP(眼睛近视了好久好久)回复于 2002-05-30 17:28:06 得分 20
帮助文件都是能单独执行的!
用 Shell 就行吧!Top
4 楼shawls(VB Fan)(QQ:9181729)回复于 2002-05-30 17:55:00 得分 20
添加HtmlHelp到工程
Create a new project, Form1 is created by default. Add a few controls to the
form.
Add a module to the project, and add the following constants to the declarat
ion section of the module:
0APublic Const HH_HELP_CONTEXT 3D &HF
Public Const MYHELP_FILE = "myfile.chm"
NOTE: "myfile.chm" is the path and name of the HTML Help file (.ch
m) you created earlier.
Add the following HTML Help API declaration to the module:0D
Public Declare Function HtmlHelpLongArg Lib "hhctrl.ocx" _0D
Alias "HtmlHelpA" (ByVal hwndCaller As Long, _
ByVal pszFile As String, ByVal uCommand As Long, _
ByVal dwData As Long) As Long0D
Intercept the form's KeyUp method to capture the F1 key using the following
sample code in the Form KeyUp event procedure:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
dim iRetCode As Long
If KeyCode = vbKeyF1 Then
iRetCode = HtmlHelpLongArg(Me.ActiveControl.hWnd,_
MYHELP_FILE,HH_HELP_CONTEXT,Me.ActiveControl.HelpContextID)0D
End If
End Sub
Set the form's KeyPreview, WhatsThisHelp, and WhatsThisButton properties to
TRUE.
Set the HelpContextID property of each control on the form to a value from t
he help project file's MAP section.
方法二:
Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
Public Const HELP_FINDER = &HB&
Private Sub Form_Load() '主窗体载入
App.HelpFile = App.Path & "\help\*.HLP" '帮助文件
end sub
Private Sub MeuHelpFile_Click() '帮助主题-菜单
Dim Hlp As Long
Hlp = WinHelp(MainForm.hwnd, App.HelpFile, HELP_FINDER, CLng(0))0D
End Sub
以上代码来自: SourceCode Explorer(源代码数据库)
复制时间: 2002-05-30 17:53:00
当前版本: 1.0.692
作者: Shawls
个人主页: Http://Shawls.Yeah.Net
E-Mail: ShawFile@163.Net
QQ: 9181729
以上回答,仅代表个人观点
大家静静地,心平气和地做技术吧!
我是小山,我喜欢VB,现在学习C#和.net
欢迎您使用: SourceCode Explorer(源代码数据库)
来自: Http://www.dapha.net
个人主页: Http://Shawls.Yeah.Net
E-Mail: ShawFile@163.Net
Top
5 楼zihualive(子华)回复于 2002-06-14 13:40:09 得分 0
结算Top




