vb.net - How to add a tooltip to the 'X' in a Windows Form? -


i programming within visual studio 2008 vb.net. have been asked add tooltip upper closing button (the 'x' in top right of form next maximize , minimize buttons).

is there anyway in able this?

solution:

i solved using @saman answer , changing figured post in case having problem solved or @saman's exact answer.

first added tooltip toolbox form. didn't have disable tooltips minimize, maximize , close , doesn't appear. used @saman function 1 minor change:

protected overrides sub wndproc(byref m system.windows.forms.message)      if m.msg = 160 , m.wparam = 20         tooltip1.settooltip(me, "save , close")     else         mybase.wndproc(m)     end if end sub 

as can see instead of using tooltip1.show() used tooltip1.settooltip(). found show worked infrequently, yet settooltip set tooltip of ('x') close button new text ("save , close") , shows whenever mouse goes on close button.

at first must disable tooltips minimize, maximize, , close button here useful links: how disable tooltips minimize, maximize, , close button

and here: disable tooltips minimize, restore , close button

then can use code show tooltip:

protected overrides sub wndproc(byref m system.windows.forms.message)          if m.msg = 160 , m.wparam = 20             tooltip1.show("closeeeeee", me)         else             mybase.wndproc(m)         end if end sub 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -