Change the title bar etc?
-
Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat
-
Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat
-
Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat
The caption bar and the maximize, minimize, close buttons are drawn by the windows operating system. I did some research, and there is very little you can do about it. The only way you can do it is to make a form with no border, make your program skinable (which is a pain), and add draging and resizing support. At least this is the way I had to do it. If there is a better way tell me too.
-
Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat
anotherside2000 wrote: I was wondering if it is possible to customize the title bar, buttons etc. What about checking out the CodeProject articles about Balloon Windows with C# ? When you know a Form is mostly an oriented-object event-based class running on top of a standard WIN32 Window, you can figure out that this is possible. The form is created with hardcoded window styles (managed by an hardcoded default .NET System.Windows.Forms.CreateParams instance). But, once that form is created (this.Handle!=0), you could just start hacking the underlying window just like with C/C++ code. For that purpose, use P/Invoke unsafe native methods like SetWindowStyle, ... You'll need the hwnd of that window : that's
this.Handle
(cast the returned IntPtr to an int if you like). Be also sure to Hide the SizeGrip (drawn around the window) with a simplethis.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
Good luck! -
Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat
Thank you all for the help! Appreciate it :) Sincerely Pat