Solved

Draw on TitleBar (C#!)

Posted on 2004-09-13
5
3,079 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0
 
LVL 10

Expert Comment

by:ptmcomp
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

11 Experts available now in Live!

Get 1:1 Help Now