VB.NET Making a new font Bold and italic
Posted on 2004-08-24
Im trying to make an ap with 3 checkboxes for bold italic and underline text
so which ever ones are seleced when you click a button a label will then be styled with that font
so if you check bold and italic then the font will be bold and italic style, and if you uncheck them all then the font will be just regular
In vb 6 this would have been easy by just setting the font properties, but as vb.net is crap it doesnt let u do this but forces u to make a new font and the style thing is stupid cos it does this or and thing, which doesnt do a damn thing except makes everything bold.
so does anyone know how to do this in vb.net
u would think this
Dim MyFont As New System.Drawing.Font(textFamily.Text, mainTextSize, (System.Drawing.FontStyle.Bold And System.Drawing.FontStyle.Italic And System.Drawing.FontStyle.Underline))
would give u a bold, italic and underlined font but oh no its just bold nothing else
i just want to be able to say if boldbox.checked or italicbox.checked or underlinebox.checked then make a font with these styles
hope that all makes some sense, any help would be great!