Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

VS 2010 Help please - Richtextbox1 colorchange

$
0
0
Hello, ive already made a thread for this but is really long and confusing so heres another.

Im using this code:

Code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        IE.RichTextBox1.SelectionColor = Color.Blue
        IE.RichTextBox1.AppendText(DateTime.Now & "                    " & LOGON.MaskedTextBox1.Text & "                    " & IE.Label6.Text & TextBox22.Text & TextBox22.Text)
        IE.RichTextBox1.SelectionColor = Color.Red
        IE.RichTextBox1.AppendText(TextBox21.Text & TextBox22.Text & TextBox22.Text & TextBox22.Text)
        Me.Close()
    End Sub

and it has this result:

Attachment 99565


The intention was to have the datetime, user id etc in blue and the remarks (Which is the text beaneath) in red, this works the first time round but doesnt there after that. Am i doing anything wrong in the coding?

Cheers
Attached Images
 

Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>