Customize Title Bar

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.
 
R

Robbe Morris - MVP C#

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.
 
R

RickL

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
 
B

Bob Powell [MVP]

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.
 
K

KK

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.
 
B

B.

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.
 
B

B.

Hi Bob,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top