P
Picho
Hi all,
Is there any .NET way (I am not rulling out API usage) to add button(s) to a
form's title bar?
I found some non-.NET solutions that did actually work in VB6 but not in the
..NET forms...
I tried painting, but the paintaing area provided by the form is only the
client area - no visible way to paint on the title bar.
Since my application is MDI parent and children (even though i would love a
generic solution), I also tried something silly that worked: adding a button
member to the form (actually a derived class of form), and in the
constructor, adding it to the MDIParent.Controls property. after doing so,
all that is left is controling the button's position accurding to the form
position and size. since the button is located on the MDIParent it has a
"Z-Order" which is higher than the form, and therefor drawn on top of it.
Only two problems with that: I had to hide the buttons of un-focused forms
because otherwise they all appear on top of every other element. the second
problem was drawing the button when minimized (no focus when moving a
minimized mdi child form - thus, unable to determine if to show or hide the
button) and drawing the button when maximized - this seems all and all
impossible to do - no way to place even that "super-button" on top of the
maximized title bar.
any help would be great,
Picho.
Is there any .NET way (I am not rulling out API usage) to add button(s) to a
form's title bar?
I found some non-.NET solutions that did actually work in VB6 but not in the
..NET forms...
I tried painting, but the paintaing area provided by the form is only the
client area - no visible way to paint on the title bar.
Since my application is MDI parent and children (even though i would love a
generic solution), I also tried something silly that worked: adding a button
member to the form (actually a derived class of form), and in the
constructor, adding it to the MDIParent.Controls property. after doing so,
all that is left is controling the button's position accurding to the form
position and size. since the button is located on the MDIParent it has a
"Z-Order" which is higher than the form, and therefor drawn on top of it.
Only two problems with that: I had to hide the buttons of un-focused forms
because otherwise they all appear on top of every other element. the second
problem was drawing the button when minimized (no focus when moving a
minimized mdi child form - thus, unable to determine if to show or hide the
button) and drawing the button when maximized - this seems all and all
impossible to do - no way to place even that "super-button" on top of the
maximized title bar.
any help would be great,
Picho.