"MSDOS" Style!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to put an 'MSDOS' style textbox or something similar to display the
progress of the code being processed.

I have tried using an RTF control as being able to display lines of text in
different colours will be quite funky.

The main trouble is getting the text to scroll upwards as the process
continues, the cursor remains on the first line of the control so once the
view is full, the 1st lines of text remain in view.

I am adding text using:

rtfControl.Text = rtfControl.Text & "New text" & vbNewLine

But how can I get the cursor to stay at the bottom of the text leaving the
latest action in view?

Any help on this would be great.

Cheers,
Steve.
 
Steve

Try

rtfControl.Text = rtfControl.Text & "New text" & vbNewLine
rtfControl.SelStart = Len(rtfControl.Text )

Ron W
 
Thanks that works a treat :)

Do you know how I go about changing the colour of the text?

Cheers,
Steve.
 
See if this snip of code is helpfull:

rtfControl.Text = ""
For i = 0 To 9
rtfControl.SelColor = vbRed
rtfControl.SelFontSize = 12
rtfControl.SelItalic = True
rtfControl.Enabled = True
rtfControl.SelStart = Len(rtxtTest.Text)
rtfControl.SelText = "RED "
rtfControl.SelColor = vbGreen
rtfControl.SelFontSize = 8
rtfControl.SelItalic = False
rtfControl.SelStart = Len(rtxtTest.Text)
rtfControl.SelText = "GREEN " & i & vbCrLf
rtfControl.SelStart = Len(rtxtTest.Text)
Next

Ron W
 
Back
Top