List Info

Thread: Font




Font
user name
2006-04-07 17:42:34
look in the vb.net help for the FontStyle Enum

add up the numbers for each of the individual styles you
want to combine.
use that number as the fontstyle argument in the font ctor.
eg:
bold = 1
italic = 2

use 3 to mean bold + italic

so use this..
dim myFont as Font = New Font(fontName, fontSize, 3,
GraphicsUnit.Point, 0)


-----Original Message-----
From: Discussion of writing applications and components
using Visual Basic
.NET [mailto:VBDOTNETDISCUSS.DEVELOP.COM]On Behalf Of Steven
Amani
Sent: Friday, April 07, 2006 1:37 PM
To: VBDOTNETDISCUSS.DEVELOP.COM
Subject: Re: [VBDOTNET] Font


I think I tried that and it didn't work. Let me try it
again...

-----Original Message-----
From: Phil Sayers [mailto:philCDS-AM.NET]
Sent: 07 April 2006 18:20
To: VBDOTNETDISCUSS.DEVELOP.COM
Subject: Re: Font

dim myFont as Font = New Font(fontName, fontSize,
Drawing.FontStyle.Bold
And Drawing.FontStyle.Italic And Drawing.FontStyle.Underline
,
GraphicsUnit.Point, 0)

-----Original Message-----
From: Discussion of writing applications and components
using Visual
Basic .NET [mailto:VBDOTNETDISCUSS.DEVELOP.COM]On
Behalf Of Steven
Amani
Sent: Friday, April 07, 2006 12:02 PM
To: VBDOTNETDISCUSS.DEVELOP.COM
Subject: [VBDOTNET] Font


The answer to this is probably obvious but I am trying to
create a font
during runtime using:

dim myFont as Font = New Font(fontName, fontSize,
Drawing.FontStyle.Bold
, GraphicsUnit.Point, 0)

the problem I have is that how do I specify if I want
Drawing.FontStyle.Bold AND Drawing.FontStyle.Italic AND
Drawing.FontStyle.Underline as the font style.

Thanks for your help.

Regards

Steve

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release
Date: 4/6/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release
Date: 4/6/2006

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release
Date: 4/6/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release
Date: 4/6/2006

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )