How can i set the font of a VB form programmatically / Dynamically
-
I want to change the fonts of the VB forms dynamically.My intension is to change the font depending on the System's Regional and language settings during runtime.I have tried the Form1.Font = "Tahoma" .Even though it didnt give any error, it did not make any changes.Please help. :)Regards Ranjan
-
I want to change the fonts of the VB forms dynamically.My intension is to change the font depending on the System's Regional and language settings during runtime.I have tried the Form1.Font = "Tahoma" .Even though it didnt give any error, it did not make any changes.Please help. :)Regards Ranjan
-
I want to change the fonts of the VB forms dynamically.My intension is to change the font depending on the System's Regional and language settings during runtime.I have tried the Form1.Font = "Tahoma" .Even though it didnt give any error, it did not make any changes.Please help. :)Regards Ranjan
Setting the font of the Form will not change the font of the controls on it. (Each control will have it's own Font property.) It only changes the font of the titlebar and any text directly written, using only certain methods, to the form surface itself. Also, you change the Font by creating a new Font object, not specifying a string. One possibility is:
myForm.Font = New Font("Tahoma", 8)
The Font class has about a dozen constructors, so you can find out more here[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 14:44 Monday 6th March, 2006