How to change font size dynamically?

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

How can I change the font size of a text box dynamically?

I tried this but it didn't work. It said 'Size is Read-Only'. Any other
ways around this? Here's the code:
txtDisplay.Font.Size = 10
 
Hi,

Dim fnt As Font

fnt = TextBox1.Font

TextBox1.Font = New Font(fnt.Name, 12, FontStyle.Bold)

Ken
 
Hello,

VB Programmer said:
How can I change the font size of a text box dynamically?

I tried this but it didn't work. It said 'Size is Read-Only'. Any other
ways around this? Here's the code:
txtDisplay.Font.Size = 10

Quick and Dirty:

\\\
Me.Font = _
New Font( _
Me.Font.FontFamily, _
200, _
Me.Font.Style, _
GraphicsUnit.Pixel _
)
///

HTH,
Herfried K. Wagner
 
Back
Top