Thanks, I can do the rich textbox, but am really looking for a label or string that can be used to set the label's text (or button, whatever). I tried bolding a selection in a richtextbox and setting a label's text to the that, but it lost the formatting.
Thanks, Pirate. Never used that before. In the code below, I get an error "Expression does not produve a value" in the call to G.DrawString. Can you see what's wrong?
VB Code:
Private Sub cmdBold_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBold.Click
Dim G As Graphics
Dim F As New Font(Label1.Font.Name, Label1.Font.Size, FontStyle.Bold)
Dim x, y As Integer
Label1.Text = "Select a "
x = Label1.Text.Length
y = Label1.Height
G = Me.CreateGraphics
Label1.Text += G.DrawString("Project", F, New SolidBrush(Color.Black), x, y)
Originally posted by salvelinus Thanks, Pirate. Never used that before. In the code below, I get an error "Expression does not produve a value" in the call to G.DrawString. Can you see what's wrong?
VB Code:
Label1.Text += G.DrawString("Project", F, New SolidBrush(Color.Black), x, y)
Here you are assigning a sub to text property of the textbox control . You can't do that but what do you want to do exactly ?