|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help on HelpProviderI'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 "lgbjr" <lgbjr@nospam.cnrgi.com> schrieb: Typically forms which are resizable and can be minimized have a main menu > 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. 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 /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Herfried,
Thanks, that's what I was looking for. works great! Lee Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:%23wHGGxz1GHA.4752@TK2MSFTNGP05.phx.gbl... > "lgbjr" <lgbjr@nospam.cnrgi.com> schrieb: >> 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 > /// > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Print the RichTextBox
Help Clearing data in MaskEditBox Control dumb question IIF referencing both conditional parts regardless of condition? How to return value in Combobox Parsing XML Help with memory/resource use Compiled HTML helpfile does not work when application is installed Adding parameters to stored procedures dbl.quotes in a text file data |
|||||||||||||||||||||||