CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VB >  基础类

help help 帮助文件的加入 (高分)

楼主zihualive(子华)2002-05-30 17:15:40 在 VB / 基础类 提问

你好,请问在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

相关问题

  • help help 帮助文件的加入 (高分)
  • 讨论,如何在VS.net帮助集合中加入自己的帮助文件??给分!
  • 急,C#中如何加入一个做好的帮助文件?
  • 如何在java中加入帮助文件(chm格式)
  • 如何把帮助文件(.chm)加入程序中
  • 帮助文件,急!急!急!多给分!
  • 怎么样在帮助文件里面加入声音和动画!
  • installshield帮助文件
  • CHM帮助文件
  • 怎么样在窗口中加入帮助文件呢?帮助文件的格式又是如何创建的呢??

关键词

  • .net
  • 文件
  • help
  • byval
  • chm
  • htmlhelp
  • 帮助文件
  • dwdata
  • keyup
  • const

得分解答快速导航

  • 帖主:zihualive
  • tulip_hui
  • HeatLoad
  • ILP
  • shawls

相关链接

  • Visual Basic类图书
  • Visual Basic类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo