473,778 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom caption on form title bar

Hello,

I would like my program to display the caption on the form (top of form
on title bar) in a different font. I would ideally like to have one
part of the form caption in one font, and another part in a standard
(i.e. Arial) font. How do I go about doing this? It is probably an
an override of the standard form or a custom draw routine for the
caption.
Mike McWhinney
elja, Inc.

Sep 28 '06 #1
2 5111
You need to override WndProc and handle the WM_NCPAINT message.

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

"eljainc" <el*****@sbcglo bal.netwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello,

I would like my program to display the caption on the form (top of form
on title bar) in a different font. I would ideally like to have one
part of the form caption in one font, and another part in a standard
(i.e. Arial) font. How do I go about doing this? It is probably an
an override of the standard form or a custom draw routine for the
caption.
Mike McWhinney
elja, Inc.

Sep 29 '06 #2
Can you provide a short example of this?

Thanks.
Mike

Bob Powell [MVP] wrote:
You need to override WndProc and handle the WM_NCPAINT message.

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

"eljainc" <el*****@sbcglo bal.netwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello,

I would like my program to display the caption on the form (top of form
on title bar) in a different font. I would ideally like to have one
part of the form caption in one font, and another part in a standard
(i.e. Arial) font. How do I go about doing this? It is probably an
an override of the standard form or a custom draw routine for the
caption.
Mike McWhinney
elja, Inc.
Oct 2 '06 #3

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

Similar topics

1
1944
by: Ursula | last post by:
Is there a way to change the default color of a windows form title bar/caption bar from within an application (without changing the user's preferences)? I do know how to remove the title bar along with a lot of other functionalities. It would be helpful to get away from this bright blue color that restricts all color schemes. I have tried: the systemcolors class ActiveCaption (a read-only property)
3
4994
by: Ken | last post by:
Hi. I've defined a custom database property called Version. It is a text value. I wanted to know if there is a way to include that value on the title bar of a form window. Also, is there a way to include it on the title bar of the database window? I'm using Access 97. Thanks for any info!
2
2289
by: Sean Mullaly | last post by:
I have a custom Access menu with sub-menus and sub-sub-menus. (220 items). Right now I have created 220 Functions and attached each individual Function to the specific OnAction property. The Functions return Text which is the same as the Caption of the sub-sub-menu items. I would like to reference the Custom Popup Caption of these sub-sub-menus and pass it through one Function for input in a form. *** Sent via Developersdex...
2
1734
by: James Curran | last post by:
Here's a question for the group. I am presently writing a class, which is a simple Dialog/Form. It handles a fairly common function, so I writing it to be generic enough to be dropped into any application. Now, here's the problem: At one point, it pops up a MessageBox --- What should I put into the Caption of that MessageBox. The "official" (if somewhat abandoned) standard is to put the title of the application there. But, since...
2
6463
by: Trammel | last post by:
Hi. I have been trying to make a simple application that will sit in the background and alert me of any changes in window focus (IE: Pop-up windows) on my system. I have used DirectTextToSpeech from Microsoft and tried the following code... The problem I am having is that it detects its own caption fine... but no captions of other windows :¬/ Could someone please have a look at the following code and lemme know what
2
2561
by: rdemyan via AccessMonster.com | last post by:
I have a custom message form that I want to display when the user shuts down my app. Some clean up needs to be done during shutdown and I want to display this form and then display various messages in the label on the form as the shutdown cleanup proceeds. I have a hidden Startup form. So in the Startup form OnClose event, I am loading the message form and then changing the label caption as the code proceeds to do the cleanup of...
7
9083
by: Marcolino | last post by:
Hi all, I need to add a custom button to title bar on a form in addition of a standard button. (Minimize/Maximize, close etc.) I need also to handle OnClick event of this button. I looked around google but i'm not able to find any example that can help me. Many thanks in advance for your help. Marco
1
4383
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property grid doesn't show colloections i.e. if I have a List<Objectthen the Collection is shown but when I click on the "..." button next to it nothing comes up. If I say CustomPropertyGrid p = new CustomPropertyGrid(); p.SelectedObject = new...
2
1236
by: deviantseev | last post by:
Hi I am writing a custom tab control. I am capturing a caption property in a page which then changes the caption of the associated tab. (Similar to window's tab control). I am using a delegate to capture the event of the change of the property and then I am changing the text value of the associated tab. The problem is that after I added the delegate code, I am unable to render the form in the designer. It's telling me that the 'Object...
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9470
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10127
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8957
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5370
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2865
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.