How to make text bold...

RNRN
edited March 2007 in Software
This is a VB 6.0 question :shock:

I have 2 forms, a command button and a rich text box.

The form contains a button and another contains a rich text box.

How would I code the button to make the RTB text in the other form bold? or italic... and so on...

Comments

  • haha it's been ages since I've done VB 6, i'm more of a .net guy, and a C# guy for that matter.

    Try this:
    to make it bold:
    Private Sub Command1_Click 
    
    Form1.RichTextBox1.SelBold = True
    
    End Sub
    

    to make it italic:
    Private Sub Command1_Click 
    
    Form1.RichTextBox1.SelItalic = True
    
    End Sub
    

    and replace true with false to undo bold/italic.
  • Awesome. Thanks :-D
  • Yeah i kinda pulled that out of nowhere with a sprinkle of 4 year old knowledge.
  • I have a question (while we are on the topic).

    How would I go about making a window full screen?
  • Josh wrote:
    I have a question (while we are on the topic).

    How would I go about making a window full screen?

    I can't whip out code out of nowhere for that one, but the logic would be:

    Maximize the forum (Form1.WindowState = vbMaximized (i think))
    Hide the title bar (Set the WindowStyle)[/code]
Sign In or Register to comment.