implicit conversions on FontStyles

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

Hi, I am trying to build a font style like this

Dim currStyle As Drawing.FontStyle

currStyle = Drawing.FontStyle.Regular

currStyle += Drawing.FontStyle.Bold



but of course thats an implicit conversrion from integer to
system.drawing.fontstyle, how would you correct this problem? thanks
 
Brian,
You would use the Or operator to combine enum values, have you tried
something like:
Dim currStyle As Drawing.FontStyle

currStyle = Drawing.FontStyle.Regular

currStyle = currStyle Or Drawing.FontStyle.Bold

Hope this helps
Jay
 
* "Brian Henry said:
Hi, I am trying to build a font style like this

Dim currStyle As Drawing.FontStyle

currStyle = Drawing.FontStyle.Regular

currStyle += Drawing.FontStyle.Bold

\\\
currStyle = currSTyle Or FontStyle.Bold
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top