Help on HelpProvider

L

lgbjr

hi All,

I'm building the help system for a VB.Net 2005 winform application (some
tooltips and a HelpProvider, etc.). For the HelpProvider, there are controls
that I would like to have "What's This" support by using the ? button in the
form header, but.....

I don't want to give up the Min and Max buttons. So, If I create my own ?
button on the form somewhere, what do I put in the Click Event? I never used
VB6, but in all of my searching, I found the VB6 equivalent, which is
form.WhatsThisMode.

I'm assuming that I'm not the only one that has ever wanted the ? button
function without giving up the Min and Max buttons, but after googling for 4
hours, I just can'f find the right combination of keywords to lead me to a
solution!

TIA
Lee
 
H

Herfried K. Wagner [MVP]

lgbjr said:
I'm building the help system for a VB.Net 2005 winform application (some
tooltips and a HelpProvider, etc.). For the HelpProvider, there are
controls that I would like to have "What's This" support by using the ?
button in the form header, but.....

I don't want to give up the Min and Max buttons. So, If I create my own ?
button on the form somewhere, what do I put in the Click Event? I never
used VB6, but in all of my searching, I found the VB6 equivalent, which is
form.WhatsThisMode.

Typically forms which are resizable and can be minimized have a main menu
item "Help" containing a menu item "What's this" which enables the "What's
this" help mode. You can use p/invoke with 'PostMessage' to enable the
"What's this" help mode:

\\\
Imports System.ComponentModel
....
Private Decalre Auto Function PostMessage Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal Msg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer _
) As Boolean

Private Const WM_SYSCOMMAND As Int32 = &H112
Private Const SC_CONTEXTHELP As Int32 = &HF180

Public Sub WhatsThisMode()
If _
Not PostMessage( _
Me.Handle, _
WM_SYSCOMMAND,
SC_CONTEXTHELP, _
0 _
) _
Then
Throw New Win32Exception()
End If
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top