Customize Title Bar

  • Thread starter Thread starter B.
  • Start date Start date
B

B.

Does any body knows how can I customize winform's title bar to add
some controls. For example, I need to add a text box and a button.

Thanks.
 
Winforms do not support that. The close thing you could do
is go borderless on the form and make up your own minimize,
maximize, and close buttons.
 
Robbe,

When I create a borderless form and run the application, the task bar
icon has no text. Normally, it would display the titlebar text.

Is there a way to overcome this problem?

Thanks,
RickL
 
You can override WndProc to catch the various WM_NCxxx messages to draw
custom controls, handle clicks and such.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
hi bob,

thats an interesting suggestion.

actually, now there is a big community of developers who is working on .NET
and C# (properly) but which will not have any background in MFC or Win32!

can you PLEASE provide ANY example on what can be achieved by WndProc or
CreateParameters etc.

I know its kinda too much to ask for code samples, but still, if you can
provide some expert snippets, would help the community a lot.
 
I went throught all those posts/examples, most of them are talking
about paint the title bar programmatcially. It is easier for a button,
but how about a text box or richedit box, how can such control takes
users input of text?

Thanks.
 
Hi Bob,

How do you draw controls like text box, richedit box and still allow
user type in text? Thanks.
 
Back
Top