Answered by:
How to change the Title Bar appearance??

Question
-
Hi everyone
Can anyone help me on the following topic. I want to change the looka nd feel of my system forms. But i have no idea how one would change the task bar to look differently.
I do not want to use the form properties to hide the task bar and make my own. I want to change the existing forms one. I want to be able to change the color, change the close,minimize and maximize buttons.
Thanks in advance
Monday, October 9, 2006 5:26 AM
Answers
-
Ahh, Yes you can but its not so easy! You have to use P/Invoke for this:
The thing you are trying to achieve is known as Drawing in Non Client Area of Windows Form. Title Bar of a Windows Form is not in Client Area of it and there is not direct way of painting it.
Anyhow You will get a lot of articles and project on it on Internet here is it:
http://www.codeplex.com/Wiki/View.aspx?ProjectName=CustomerBorderForm
http://www.geekswithblogs.net/kobush/articles/CustomBorderForms.aspx
Cheers ;-)
Monday, October 9, 2006 2:49 PM
All replies
-
You can't change them without drawing your own. The titlebar and its contents are managed by Windows itself. You have to draw the caption the way you want manually.
Michael Taylor - 10/9/06
Monday, October 9, 2006 1:32 PM -
Ahh, Yes you can but its not so easy! You have to use P/Invoke for this:
The thing you are trying to achieve is known as Drawing in Non Client Area of Windows Form. Title Bar of a Windows Form is not in Client Area of it and there is not direct way of painting it.
Anyhow You will get a lot of articles and project on it on Internet here is it:
http://www.codeplex.com/Wiki/View.aspx?ProjectName=CustomerBorderForm
http://www.geekswithblogs.net/kobush/articles/CustomBorderForms.aspx
Cheers ;-)
Monday, October 9, 2006 2:49 PM -
Hi RizwanSharp
This is exactly what i'm looking for. a step by step explanation. But i have trhe following problem. They show the code, but they do not show where it should be placed, whether you need a windows project???? Also the libaries they are using???
If i make a windows project and place just a small part of code i get errors. Please, any assistance will be great. Do you hace a mini sample???
Thanks in advance
Wednesday, October 11, 2006 5:24 AM -
Hi Rizwan
Is there any way I can change the title bar color in C# Windows Forms. I couldn't find any article/example on internet with .NET or C#. May be you can help regarding this.
I would appreciate your prompt reply.
Thanks
Maqsood Ahmad
Wednesday, May 7, 2008 4:30 AM -
Hi Maqsood,
I have provided links where you can find information about how to do that. You can have a look on them.
BTW, If you are developing a new app then you can use WPF for that because doing this type of thing is a peace of cake in WPF. Here are a few tutorials:
http://janmdotnet.blogspot.com/2006/02/custom-chrome-in-wpf.html
http://www.vb-magazin.de/forums/blogs/janm/archive/2006/06/19/4655.aspx
I hope this helps,
Best Regards,
Rizwan
Wednesday, May 7, 2008 5:32 AM