Click here to Skip to main content
11,926,805 members (56,004 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


5 bookmarked

Make a control's text font bold at runtime in a windows application

, 8 Nov 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Code snippet to make a control's text font style to bold dynamically at runtime in a windows application

This code snippet is to change the font style of a control. This is specially useful for controls that are dynamically added from code at runtime.

lblSample.Font = new Font(lblSample.Font, FontStyle.Bold);
chkSample.Font = new Font(chkSample.Font, FontStyle.Bold);



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

You may also be interested in...

Comments and Discussions

GeneralThanks for voting. But, there will be beginners as well, who... Pin
TheDotNetGeek17-Nov-10 19:23
memberTheDotNetGeek17-Nov-10 19:23 
GeneralReason for my vote of 2 Extremely basic info Pin
PSU Steve15-Nov-10 11:52
memberPSU Steve15-Nov-10 11:52 
GeneralReason for my vote of 4 Thanks! Pin
Maggi38-Nov-10 6:49
memberMaggi38-Nov-10 6:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 8 Nov 2010
Article Copyright 2010 by TheDotNetGeek
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid