Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

catch click on help button

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hello,

I would like to catch the click event on the help button. I that way, I would call the help form when the user hits the button (because I only have a help-page for each form)

Does anyone has an idea how I can catch that event?

thanks!
Björn
 
I'm not sure I understand you completely. Is the help button on your form? If not, which help button is it?

Ben

There's no place like 127.0.0.1.
 
It was my intention to use the default helpbutton, and I have found a way to catch that click

Public Const
WM_SYSCOMMAND As Integer = 274
Public Const WM_HELP as integer = 61824
Protected Overloads Overrides Sub WndProc(ByRef m As Message)

If m.Msg = WM_SYSCOMMAND AndAlso m.WParam.ToInt32 = SC_CLOSE Then
'Clicked the X
_closeClick = True
MyBase.WndProc(m)
ElseIf m.Msg = WM_SYSCOMMAND AndAlso m.WParam.ToInt32 = WM_HELP Then
'Clicked the ?
MsgBox("you requested help?")
Else
MyBase.WndProc(m)
End If


End Sub


The thing I dislike now is that I have to disable my min and max button.

Does anyone has an idea how I can still have my min and max buttons up?

Maybe there's a way to add a button to the controlbox?

Björn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top