Property 'bold' is read only

I just recently started a computer programming class, and we are working with text boxes alot in vb 6.0.
we were going to make a program with controlls that change the font properties, but whenever we try to use bold, it comes up as read only. the book doesn't help and the teacher is stumped.

the code im using is similar to:

Code Block

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.font.bold = True
End Sub



How do you change the bold property of text using a button or check box in visual basic 2005 express or 6.0?
How do you change a property from read only?
[1055 byte] By [greengorilla] at [2008-1-10]
# 1
Must be missing something, are you using VB6 or Visual Basic 2005?
GlennWilson at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...
# 2

TextBox1.Font = New Font(TextBox1.Font, FontStyle.Bold)

Adam

AdamD.Turner at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...