Solved

Draw on TitleBar (C#!)

Posted on 2004-09-13
5
3,081 Views
Last Modified: 2012-05-05
I'd like to create a 'skinned' window. But I need to be able to create my own TitleBar and such. Any suggestions? this needs to be in C#. All the code I've been able to find is in C++ and VB6 ...which isn't at all helpful.
0
Comment
Question by:derekthornton
  • 3
5 Comments
 
LVL 18

Expert Comment

by:armoghan
ID: 12051412
A suggestion
while you are making a skinned window, you can hide the actual titlebar and create your own titlebar with buttons of minimze/max etc and provide the same functionality
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12051431
The Titlebar colors/shape are determined by system settings or themes. They apply
to all windows and cannot easily be manipulated. You would have to draw
directly to the frame during NC paint events or replace the titlebar with a
custom control and implement the windowing functionality yourself.

http://www.error-bank.com/microsoft.public.dotnet.languages.csharp/194174_Thread.aspx
0
 
LVL 7

Accepted Solution

by:
God_Ares earned 500 total points
ID: 12053129
have a look at this:

http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20040401WinFormsMH/manifest.xml

might be interesting,.. just a helpfull comment nothing more...
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12053659
0
 
LVL 10

Expert Comment

by:ptmcomp
ID: 12091212
If you want to override the default painting of the non cient area of the window (frame & title bar) then you need to override WndProc and process the WM_NCPAINT messages (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_8gdw.asp). The other possibility is to draw in the client area and implement the resize and window move functionality yourself.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now