Click here to Skip to main content
15,790,795 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How do you show a tooltip when you hover over your mouse on the title or window frame thing where the min, max, and close is at. Where the icon and title of the form is at? I want to show a tool tip there. I dont even know what it is called.

[edit]Spurious close tags removed - OriginalGriff[/edit]
Updated 4-Aug-11 9:12am

It's called the Title Bar (if you look at your Desktop properties, under "Appearance"..."Advanced" you will find the names of various windows display parts)

As far as tooltips go, I think you are on a looser - there is no way I know of to get the existing tooltip in .NET, so changing it will be difficult if not impossible. I'm not even sure I could do it in MFC...but it has been a long time since I used that!
Share this answer
If it's possible at all, you're probably going to have to use pInvoke and one or more Windows API functions to do it. Why do you want to add tooltips to those buttons?

EDIT (after comment) ==============

You might want to find a way to handle the WM_NCMOUSEMOVE event (override WndProc()) for the titlebar, then. I'm not sure how you'd go about doing that in .Net, but google may come up with something.

Overriding WndProc would look like this:

protected Override void WndProc(System.Windows.Forms.Message msg)
    switch (msg.Msg)
        case WM_NCMOUSEHOVER :
            // do a hit test to see where the mouse is hovering and respond accordingly
            // possible hit test values are HTCLOSE (close button) HTCAPTION (titlebar), etc
Share this answer
Member 8015046 4-Aug-11 14:33pm    
Oh I dont want to tooltip the buttons. I want to tooltip the title bar area. I used as a directory or to show where I came from, because I reuse some forms for simplicity. So the directory kind of gets big and doesn't show the whole directory. So I just want a tooltip to show where my program came from
Member 8015046 4-Aug-11 15:06pm    
Thanks I'll try this out and see if it works

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900