I'm trying to use the HTMLHelp API calls in a VB.NET program because I want
a little more functionality than is offered by the Help class in .NET.
Everything works fine except for displaying the "Search" tab. Has anyone
gotten this to work?
This is what I have so far.... The HTMLHelp API call always returns 0...
' HTML Help function for showing search
Private Const HH_DISPLAY_SEAR CH As Short = &H3
Private Declare Function HTMLHelpSearch Lib "hhctrl.ocx " Alias
"HtmlHelpA" _
(ByVal hWnd As Integer, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByRef dwData As tagHH_FTS_QUERY ) As Int32
' HTML Help Search Structure
Private Structure tagHH_FTS_QUERY
Public cbStruct As Integer ' Sizeof structure in bytes.
Public fUniCodeStrings As Boolean ' TRUE if all strings are
unicode.
Public pszSearchQuery As String ' String containing the search
query.
Public iProximity As Long ' Word proximity.
Public fStemmedSearch As Boolean ' TRUE for StemmedSearch only.
Public fTitleOnly As Boolean ' TRUE for Title search only.
Public fExecute As Boolean ' TRUE to initiate the search.
Public pszWindow As String ' Window to display in
End Structure
' ShowWindow API call
Const SW_MAXIMIZE As Integer = 3
Declare Function ShowWindow Lib "user32.dll " (ByVal hwnd As Int32, ByVal
nCmdShow As Int32) As Int32
' Show search page
Public Sub ShowHelpSearch( )
' Create search struct
Dim ss As tagHH_FTS_QUERY
ss.cbStruct = Len(ss)
ss.fUniCodeStri ngs = 0&
ss.fTitleOnly = 0&
ss.fExecute = 1&
ss.fStemmedSear ch = 0&
ss.pszWindow = ""
ss.pszSearchQue ry = ""
ss.iProximity = 0&
' Display the search tab
Dim hhWnd As Int32
hhWnd = HTMLHelpSearch( fMainForm.Handl e.ToInt32, helpFile,
HH_DISPLAY_SEAR CH, ss)
' Position help window
ShowWindow(hhWn d, SW_MAXIMIZE)
End Sub 2 2757
No I actually bypassed that stuff for a more rapid development
environment.... I use
Private Sub mnuHelpSearch_C lick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles mnuHelpSearch.C lick
Help.ShowHelp(M e, "urHelp.chm ", HelpNavigator.F ind, "")
End Sub
Which brings up the search Tab
meh
"Scott" <sc*****@yahoo. com> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. . I'm trying to use the HTMLHelp API calls in a VB.NET program because I
want a little more functionality than is offered by the Help class in .NET. Everything works fine except for displaying the "Search" tab. Has anyone gotten this to work?
This is what I have so far.... The HTMLHelp API call always returns 0...
' HTML Help function for showing search Private Const HH_DISPLAY_SEAR CH As Short = &H3 Private Declare Function HTMLHelpSearch Lib "hhctrl.ocx " Alias "HtmlHelpA" _ (ByVal hWnd As Integer, _ ByVal lpHelpFile As String, _ ByVal wCommand As Long, _ ByRef dwData As tagHH_FTS_QUERY ) As Int32
' HTML Help Search Structure Private Structure tagHH_FTS_QUERY Public cbStruct As Integer ' Sizeof structure in bytes. Public fUniCodeStrings As Boolean ' TRUE if all strings are unicode. Public pszSearchQuery As String ' String containing the search query. Public iProximity As Long ' Word proximity. Public fStemmedSearch As Boolean ' TRUE for StemmedSearch only. Public fTitleOnly As Boolean ' TRUE for Title search only. Public fExecute As Boolean ' TRUE to initiate the search. Public pszWindow As String ' Window to display in End Structure
' ShowWindow API call Const SW_MAXIMIZE As Integer = 3 Declare Function ShowWindow Lib "user32.dll " (ByVal hwnd As Int32,
ByVal nCmdShow As Int32) As Int32
' Show search page Public Sub ShowHelpSearch( ) ' Create search struct Dim ss As tagHH_FTS_QUERY ss.cbStruct = Len(ss) ss.fUniCodeStri ngs = 0& ss.fTitleOnly = 0& ss.fExecute = 1& ss.fStemmedSear ch = 0& ss.pszWindow = "" ss.pszSearchQue ry = "" ss.iProximity = 0& ' Display the search tab Dim hhWnd As Int32 hhWnd = HTMLHelpSearch( fMainForm.Handl e.ToInt32, helpFile, HH_DISPLAY_SEAR CH, ss) ' Position help window ShowWindow(hhWn d, SW_MAXIMIZE) End Sub
Yes. I know that works. I've done it. However, how do you control where the
window is shown with this method. I was using the API functions so that I
could position the window (height, width, maximized, etc.) correctly when I
load the help file. The API functions return the window handle so this is a
simple task. How do you get the window handle when using the .NET help
classes without using a FindWindow call or something of that nature?
"meh" <re************ ******@cox.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. No I actually bypassed that stuff for a more rapid development environment.... I use
Private Sub mnuHelpSearch_C lick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles mnuHelpSearch.C lick
Help.ShowHelp(M e, "urHelp.chm ", HelpNavigator.F ind, "")
End Sub
Which brings up the search Tab
meh
"Scott" <sc*****@yahoo. com> wrote in message news:%2******** *******@TK2MSFT NGP11.phx.gbl.. . I'm trying to use the HTMLHelp API calls in a VB.NET program because I want a little more functionality than is offered by the Help class in .NET. Everything works fine except for displaying the "Search" tab. Has anyone gotten this to work?
This is what I have so far.... The HTMLHelp API call always returns 0...
' HTML Help function for showing search Private Const HH_DISPLAY_SEAR CH As Short = &H3 Private Declare Function HTMLHelpSearch Lib "hhctrl.ocx " Alias "HtmlHelpA" _ (ByVal hWnd As Integer, _ ByVal lpHelpFile As String, _ ByVal wCommand As Long, _ ByRef dwData As tagHH_FTS_QUERY ) As Int32
' HTML Help Search Structure Private Structure tagHH_FTS_QUERY Public cbStruct As Integer ' Sizeof structure in bytes. Public fUniCodeStrings As Boolean ' TRUE if all strings are unicode. Public pszSearchQuery As String ' String containing the
search query. Public iProximity As Long ' Word proximity. Public fStemmedSearch As Boolean ' TRUE for StemmedSearch
only. Public fTitleOnly As Boolean ' TRUE for Title search only. Public fExecute As Boolean ' TRUE to initiate the
search. Public pszWindow As String ' Window to display in End Structure
' ShowWindow API call Const SW_MAXIMIZE As Integer = 3 Declare Function ShowWindow Lib "user32.dll " (ByVal hwnd As Int32, ByVal nCmdShow As Int32) As Int32
' Show search page Public Sub ShowHelpSearch( ) ' Create search struct Dim ss As tagHH_FTS_QUERY ss.cbStruct = Len(ss) ss.fUniCodeStri ngs = 0& ss.fTitleOnly = 0& ss.fExecute = 1& ss.fStemmedSear ch = 0& ss.pszWindow = "" ss.pszSearchQue ry = "" ss.iProximity = 0& ' Display the search tab Dim hhWnd As Int32 hhWnd = HTMLHelpSearch( fMainForm.Handl e.ToInt32, helpFile, HH_DISPLAY_SEAR CH, ss) ' Position help window ShowWindow(hhWn d, SW_MAXIMIZE) End Sub
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: R. Rajesh Jeba Anbiah |
last post by:
Q: Is PHP search engine friendly?
Q: Will search engine spiders crawl my PHP pages?
A:
Spiders should crawl anything provided they're accessible. Since,
nowadays most of the websites are been developed with PHP, you are not
supposed to doubt that.
As a proof that PHP pages could be crawled and indexed, refer this
Google search
|
by: Les Juby |
last post by:
A year or two back I needed a search script to scan thru HTML files
on a client site. Usual sorta thing. A quick search turned up a
neat script that provided great search results. It was fast,
returned the hyperlinked page title, filename, and the body txt (30
preceding and following words) in context with the search word
highlighted. Excellent.!
See it working at: http://www.ipt.co.za
Just search for "firearm"
|
by: George |
last post by:
Hi,
Anyone has the background for explaining?
I have made a search on my name and I have got a link to another
search engine.
The link's title was the search phrase for the other search engine (a
wicked phrase). Some but not all of the words of that phrase exist in
my website.
I reported it and they removed the link but did not give explanations.
|
by: Noticedtrends |
last post by:
Can inference search-engines narrow-down the number of often irrelevant
results, by using specific keywords; for the purpose of discerning
emerging social & business trends?
For example, if authors of content subconsciously mention the keywords
"lately and noticed" within the same brief sentence, the reader may
infer "an unintended message" through the process of "inferential
scanning;" a method of noting "semantic anomalies" which may...
|
by: joshc |
last post by:
If I have an array of data that I know to be sorted in increasing
order, and the array is less than 50 elements, and I want to find the
first element greater than a certain value, is a simple linear search
the best here(for loop from beginning to end of array)? It seems like
some other search algorithm like binary or whatever would be of no
benefit on this data set.
| |
by: Elaine |
last post by:
I have a truly curious problem with HtmlHelp and Sibling Mode in Visual C++
..Net 2003 in an MFC app.
Sibling mode allows the help viewer to display on top of the app, but if the
app is clicked, then the app becomes the top most window. The idea is to
let the user switch back and forth between the help viewer and the
application.
For the case of Menu Items only, sibling mode does not appear to work
correctly under normal running...
|
by: Antropoid |
last post by:
I'm writing
HtmlHelp(GetDesktopWindow()->GetSafeHwnd(),
"helpFile.chm::/introduction.htm>mainwin",
HH_DISPLAY_TOPIC,
0);
this code work in Windows 98, but do not work in Windows XP, application
write:
|
by: BenCoo |
last post by:
Hello,
In a Binary Search Tree I get the error : Object must be of type String
if I run the form only with the "Dim bstLidnummer As New BinarySearchTree"
it works fine.
Thanks for any help on this,
Benny
|
by: G Gerard |
last post by:
Hello
I have written some help files using Html Help Workshop version 4.74.8702
I use the following code to launch the chm file
Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller as long, ByVal pszFile as String, ByVal uCommand as long,
dwData as Any) as Long
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |