Help With Font Objcet

  • Thread starter Thread starter shachar
  • Start date Start date
S

shachar

hi all.
i have a grid ocx i'm using, and i have to set it's font
to an integer value returning from a font object.
when i wrote : Dim f As System.Drawing.Font
al it's propertys are readonly.
how can i set it's Bold,Underline etc..
 
You must specify the new styles / etc in the constructor

This would give you a reference to a new font based on the same font as the
containing form, but bold and italic (Assuming Me is a Form or has a Font
property returning a font):

Dim boldItalicFont as new System.Drawing.Font( Me.Font, FontStyle.Bold or
FontStyle.Italic)


See other overloads of the Font constructor for more options.
 
Back
Top