Groups | Blog | Home
all groups > dotnet drawing api > october 2003 >

dotnet drawing api : How to change label font in vb.net?


Rasool
10/2/2003 11:30:08 AM
I can't believe I am asking this but how the heck can we change the font of
a label now?
It use to be so simple.

Me.Label1.FontName = "Wingdings 3"

Rasool
10/2/2003 2:09:40 PM
Do you mind showing me a piece of code that does it. As far as I know the
font property requires system.drawing.font not a simple text. My problem is
that I can not figure out how to use system.drawing.font to change the font
of a label.

[quoted text, click to view]

Paul Hetherington
10/2/2003 3:17:42 PM
Fonts are now a class.
You instantiate a new Font class specifiying the values you want.
i.e. Me.Label1.Font = New Font("Wingdings 3",et al.)

[quoted text, click to view]

Rick Mogstad
10/2/2003 3:56:19 PM
you are thinking too VB6.

Fonts are an object, just like everything else in .NET

MyLabel.Font = New Font("Wingdings",...)





[quoted text, click to view]

Rick Mogstad
10/2/2003 3:56:19 PM
you are thinking too VB6.

Fonts are an object, just like everything else in .NET

MyLabel.Font = New Font("Wingdings",...)





[quoted text, click to view]

Rick Mogstad
10/2/2003 3:56:19 PM
you are thinking too VB6.

Fonts are an object, just like everything else in .NET

MyLabel.Font = New Font("Wingdings",...)





[quoted text, click to view]

Bob Powell [MVP]
10/2/2003 10:17:43 PM
Use the 'Font' property.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm



[quoted text, click to view]

Rasool
10/6/2003 9:40:54 AM
Thanks. You are absolutely right. I am VB6 oriented and need to change my
way of thinking towards VB.NOT. By the way how come I could not find not
even a single line of code regarding this in the help file? Am I using Help
too VB6 too?


[quoted text, click to view]

Rick Mogstad
10/6/2003 9:50:56 AM
Sorry if i offended, wasnt my intention. The help for VS.NET is quite lacking, in my opinion. I
spent quite some time figuring this all out myself. If you give it a while, it will all make
sense.


[quoted text, click to view]

AddThis Social Bookmark Button