473,545 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customising a windows close buttons and title bar

Hi all,

Some applications achieve a really nice look and feel in part because they
have changed the bar at the very top of the form window. There appears to
be a way to customise the whole bar and its buttons but I have no idea how
its done.

Can anyone point me in the right direction. Perhaps towards a tutorial or
something. I've looked myself but I'm not sure what to search for in google

Thanks

Simon

Nov 16 '05 #1
7 2172
There are multiple ways of doing this.

Win32 - you could get the handle of the titlebar and then do whatever you
wished with it. That causes some pain with the teletubbies default XP look.
So I wouldn't recommend that.

The better way is to go change the window style to the 5th property (I
forgot the name), then it appears as just a canvas. You can then write
whatever you want to make it look like, and it won't interfere with the
teletubbies or barney look that XP might come up with in future.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/

"thechaosengine " <na> wrote in message
news:20******** *************@n ews.microsoft.c om...
Hi all,

Some applications achieve a really nice look and feel in part because they
have changed the bar at the very top of the form window. There appears to
be a way to customise the whole bar and its buttons but I have no idea how
its done.

Can anyone point me in the right direction. Perhaps towards a tutorial or
something. I've looked myself but I'm not sure what to search for in
google

Thanks

Simon

Nov 16 '05 #2
SM> Win32 - you could get the handle of the titlebar and then do
SM> whatever you wished with it.

Pardon me, what is the "handle of the titlebar"?

--
Serge
Nov 16 '05 #3
tn> Some applications achieve a really nice look and feel in part
tn> because they have changed the bar at the very top of the form
tn> window. There appears to be a way to customise the whole bar and its
tn> buttons but I have no idea how its done.

Look at the WM_NCCALCSIZE, WM_NCPAINT, WM_NCHITTEST messages. By them you
tell Windows whether the particular point of your window is a title bar,
or close box, or system menu, etc, and draw whatever you wish on them. That's
WinAPI of course.

PS in most cases, the customized look appears to be worse than the standard
one, as Microsoft has skilled UI designers, after all :)

--
Serge
Nov 16 '05 #4
Every window in windows can be gotten a hold of using it's Win32 Handle. The
titlebar is nothing but yet another window.

- Sahil Malik
http://codbetter.com/blogs/sahil.malik

"Serge Baltic" <ns*@hypersw.ne t> wrote in message
news:c8******** *************** ***@news.micros oft.com...
SM> Win32 - you could get the handle of the titlebar and then do
SM> whatever you wished with it.
Pardon me, what is the "handle of the titlebar"?
--
Serge

Nov 16 '05 #5
The titlebar is nothing but yet another window.


No, the titlebar is not a separate window. To draw in it you have to
handle the WM_NC* window messages.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #6
You might try looking in Petzold's book, Programming Windows With C#. It
has a good description of how to do the things you're talking about doing.

HTH

DalePres
MCAD, MCDBA, MCSE

"thechaosengine " <na> wrote in message
news:20******** *************@n ews.microsoft.c om...
Hi all,

Some applications achieve a really nice look and feel in part because they
have changed the bar at the very top of the form window. There appears to
be a way to customise the whole bar and its buttons but I have no idea how
its done.

Can anyone point me in the right direction. Perhaps towards a tutorial or
something. I've looked myself but I'm not sure what to search for in
google

Thanks

Simon

Nov 16 '05 #7
I stand corrected. I just checked, it is indeed not a window.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/

"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:e#******** ******@TK2MSFTN GP15.phx.gbl...
The titlebar is nothing but yet another window.


No, the titlebar is not a separate window. To draw in it you have to
handle the WM_NC* window messages.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2054
by: Ajay | last post by:
hi! i have two tkinter windows on top of each other. i would like it so that the user has to complete the fields in the top windows before they can interact with the window below it. that is, i dont want the user to close the top window or minimize it or send it into the background. how would i do it? thanks
4
20773
by: moose | last post by:
OK Popup window? No problem PDF in popup? No problem But what about a couple of Close Window buttons? Imagine a "Close Window" button at the top of the popup page. Then the PDF which can scroll. And another "Close Window" button at the bottom of the page. Any suggestions for completing this task?
2
16172
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643 (possibly white) Can anyone tell me how to convert these colours to either RGB colours or the Long number used by Access. Black is 0 and White is...
1
4150
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's titlebar. When this button is clicked the window itself should be minimized to the systray On my way there I found hardly any example via Google...
1
1292
by: DwC | last post by:
Hey All, I have about six mdi windows and when i maximize them all of them except for two still have their own title bar. When i maximize the other two the minimize, maximize and close buttons move into the main menu bar and the form uses the entire mdi area, but when the other windows are max they retain their own title bar which has...
3
1685
by: Dan | last post by:
i really need to create a window/dialog that just contains a bitmap and nothing else - no window frame, caption or buttons, or any sign of a grey background. so far ive only managed to get rid of system buttons and frames, but i still can't get rid of a grey border that windows insists on showing. i just want a splash screen type thing that...
4
3135
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is...
9
12826
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How to do this... and eventually i want to modify the control box in the form of ? _ X ... I.e. adding a new button to control box. I need to detect the...
1
11612
by: SeanBoyWalton | last post by:
Hi, I'm currently trying to build a website for a DJ friend of mine and I have come stuck with a couple of issues. I've searched everywhere and put some code together but I still have problems. I want to be able to map controls of the media player to images on the page ie - when user clicks play image - song plays. I can currently get it...
0
7664
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7771
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3465
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
720
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.