HighTechTalks DotNet Forums  

VB.NET Font question

Dotnet Framework (Drawing) microsoft.public.dotnet.framework.drawing


Discuss VB.NET Font question in the Dotnet Framework (Drawing) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default VB.NET Font question - 09-27-2005 , 07:28 AM






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.


Reply With Quote
  #2  
Old   
SharpCoderMP
 
Posts: n/a

Default Re: VB.NET Font question - 09-27-2005 , 08:48 AM






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.


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: VB.NET Font question - 09-27-2005 , 09:49 PM



Thanks alot, worked like a charm


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.