How to compose Font with style which stored in string variable

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
see this code

This code return fontDlg.Font.Style.ToString() Bold, Italic which i would store in database table. so tell me how could i again compose a font style from a string variable.

suppose this one stored in a string variable string fstyle = "Bold, Italic" now tell me how could i compose a font with font style where font style stored in string variable?

FontName = "Microsoft Sans Serif"
FontSize = "15.75"
UnderLine = "true"
FontStyle = "Underline"

why font style return underline not clear but i choose Regular but this property fontDlg.Font.Style.ToString() return underline. image added

1599441.png

font dialog which property will return Regular, Bold, Bold Oblique ?

in this post i have asked two question that

1) how could i compose font with font style where style name is stored in string variable?

2) why this property of font dialog fontDlg.Font.Style.ToString() not returning Regular, Bold, Bold Oblique etc ?

looking for a example code which compose font with font style where style would be taken from string variable. thanks

Continue reading...
 
Back
Top