try this:
new System.Drawing.Font(
YOUR_NAME,
YOUR_SIZE,
((FontStyle)(FontStyle.Bold | FontStyle.Italic)));
this is how IDE creates font object for the control.
are you using any IDE? if not i'd suggest you use one. if you don't want
to spend money on something like visual studio try this:
http://www.icsharpcode.net/
there is visual studio open source clone.
adam.spamfree (AT) gmail (DOT) com wrote:
Quote:
Hi, I'm having a problem with trying to make the text of a button both
bold and italic at runtime. All that i have so far is Button.Font = New
Font("sans seriff", 9, FontStyle.Italic), but i need to make it bold as
well as italic at the same time. Thanks a lot. |