Q
Problem solve Get help with specific problems with your technologies, process and projects.

What is the code for changing the font size of a label at runtime in VB.NET?

What is the code for changing the font size of a label at runtime in VB.NET?
I'm assuming that you're talking about labels in WinForms applications. Fortunately, all you need to do is set the Font property and you'll be all set. One other interesting property you'll want to set is the AutoSize property. That will cause the label to automatically resize itself to ensure that all the text for the control will be displayed with the new font. While it's a fantastic feature, the sad part is that not all controls support it.
This was last published in May 2003

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close