Interview Question in Visual Studio 2005
Interview Question :: Visual Studio 2005 - Using Code - Both Bold And Italic @ the same time |
I'm using visual studio 2005, i'm doing a project in college and fairly new to the program. i'm using visual basic language (no C,c++,java, ect)
I have code to change my textbox to bold or italic, ect.
however i can not get the code to use both - i have tried various different approachs. all have failed.
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold)
is what i have to make it bold, i have tried all the following with no success
'1
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold and Fontstyle.italic)
'2
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold & Fontstyle.italic) 'WTF this one made it have strikethrough and be underlined - VERY wierd!
'3
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold)
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.italic)
'4
TextBox1.Font = New System.Drawing.Font(TextBox1.Font, FontStyle.Bold, Fontstyle.italic)
I've tried a few others but all have had no success. Any help would be Greatly Apreciated. |
|
|
|

Loading ...