Adding help button to Title bar in C#

  • Thread starter Thread starter Abhi
  • Start date Start date
A

Abhi

How can i add a Help button (button with ? mark on it) on
the title bar of an application in C#.
 
Abhi,

You can set the window style of your window to WS_EX_CONTEXTHELP to get
the question mark. However, it will not work if the maximize or the
minimize buttons are used. You could always paint the control yourself, if
you wish.

Hope this helps.
 
In the Form's Properties,
set MaximizeBox = false
set MinimizeBox = false
set HelpButton = true
That will show the help button.

Then add a HelpProvider to your form.
For each control you want to provide the help for,
set ShowHelp on helpProvider = true
set HelpString on helpProvider = Your help text

Hope that helps.
 
Nicholas Paldino said: "You could always paint the control yourself, if
you wish."

I tried doing this but the graphics object only paints on the client
area and not on the title bar. placing conrols on a negative Top
position simply hides them under the title bar. i also tried doing
things like (in mdi child forms only) making the button a part of the
mdi parent nad replacing it on top of the form. that worked great, but
only for mdi children and not minimized/maximized...

I am lost. ok. i wish to paint the control myself. would you please tell
me how?

thanx.

Picho
 
Back
Top