Text Size change in a text box

  • Thread starter Thread starter Vinay
  • Start date Start date
V

Vinay

Hi,

I am facing difficulty in controlling the Textbox text
size. Can someone point out where I am going wrong.

Dim TB as Textbox

TB.Text = "Test" 'Works
TB.Font = New Font(TB.Font, FontStyle.Underline) 'Works

TB.Font.Size = ??? 'Help required ???

Regards

Vinay
 
Vinay said:
Hi,
'Morning,

I am facing difficulty in controlling the Textbox text
size. Can someone point out where I am going wrong.

Dim TB as Textbox

TB.Text = "Test" 'Works
TB.Font = New Font(TB.Font, FontStyle.Underline) 'Works

TB.Font.Size = ??? 'Help required ???

Regards

Vinay

You can not change the size (probably because the OS (Windows, you know)
doesn't allow a font's size to be changed).

tb.font = new font(tb.font.name, NewSize, fonstyle.underline)
 
Back
Top