Font Size in Text box

  • Thread starter Thread starter Jonesgj
  • Start date Start date
J

Jonesgj

Hi all,

Simple one I'm sure... How can I change the size of font used in textbox at
runtime?

Jonesgj
 
Hi Jonesqj,

I learn you a trick.

You change it in the designer and then you look what code it has generated
in the designer generated code part.

You copy that to your program and change it as you wish.

(To change the font is a little but much code)

I hope this helps?

Cor
 
Jonesgj said:
Hi all,

Simple one I'm sure... How can I change the size of font used in
textbox at runtime?

Jonesgj

textBox.Font = new Font(textBox.Font.FontFamily, newSize,
textBox.Font.Style);
You may need to use a slightly different constructor if you need more
options.

- Pete
 
* "Jonesgj said:
Simple one I'm sure... How can I change the size of font used in textbox at
runtime?

\\\
Me.TextBox1.Font = New Font("Times New Roman", 22)
///
 
Back
Top