Using code to change font

halldam

New member
Joined
Aug 1, 2007
Messages
1
Programming Experience
Beginner
What would be the equivalent code in vb.net (2008) for the VB v5:

txtDisplay.fontname = "arial"

I'm a beginner's beginner! :-(
 
Select the font in Designer property, or in code create a new Font object to assign to the Font property:
VB.NET:
TextBox1.Font = New Font("Arial", 23, FontStyle.Regular)
 
Back
Top