Click here to Skip to main content
13,149,427 members (52,163 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


5 bookmarked
Posted 8 Nov 2010

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

, 8 Nov 2010
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 18:23
memberTheDotNetGeek17-Nov-10 18:23 
GeneralReason for my vote of 2 Extremely basic info Pin
PSU Steve15-Nov-10 10:52
memberPSU Steve15-Nov-10 10:52 
GeneralReason for my vote of 4 Thanks! Pin
Maggi38-Nov-10 5:49
memberMaggi38-Nov-10 5: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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170924.2 | Last Updated 8 Nov 2010
Article Copyright 2010 by TheDotNetGeek
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid