Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to call a HTML HELP file in VB

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

How to call the HTML HELP file in VB, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Article catalogue

The articles in this column are from the Internet, and the copyright belongs to the original author and the publishing websites. these articles are collected by this site for learning and reference only. No one can use these articles for commercial or other purposes. (xuebuyuan.com)

Yan Dong, Labor Insurance Office of Xiangfan City, Hubei Province

-HTML help file is a new standard of WINDOWS basic help system, and we can see it everywhere in WINDOWS 98. As a fashion, our applications can't lag behind, so I started to recompile the original help files into HTML help files. HTML HELP WORKSHOP can be found in VISUAL STUDIO 98, and it is not too difficult to use it. Since I have my own personal website, it is easy to make HTML files. Soon, a help file is complete (MY.CHM). But how do you call it in VB?

-try the original API function WINHELP with the error message "the MY.CHM file is not a WINDOWS help file, or the file is corrupted". Obviously, the WINHELP function does not recognize this new type of help. Take a look at the HTMLHELP WORKSHOP help file, which prompts you to use the API function HTMLHELP to call the HTML help file, but it is declared in C format, as follows:

HWND HtmlHelp (HWND hwndCaller

LPCSTR pszFile, UINT uCommand, DWORD

DwData)

According to the instructions, the parameter hwndCaller is the handle to the window, pszFile is the path and name of the HTML help file, uCommand indicates the action performed, and dwData is the required value for the uCommand parameter. Which file is it included in, and how do you convert it to VB format? Careful study of the help file, the help file mentioned: the HTMLHELP function is included in the hhctrl.ocx file. So you get the declaration of the HTMLHELP function in VB:

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

-now let's go back to VB and talk about practical applications. First, of course, add the above declaration to the project, then edit the project menu and add the following code to the CLICK method of the help menu:

Htmlhelp HWND, "MY.CHM", 0je 0

-after running the project, select the help menu to display the HTML help file.

After reading the above, do you know how to call the HTML HELP file in VB? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report