|
-
September 19th, 2001, 01:11 PM
#2
Re: RichTextBox API or Method
here is a simple sample that will select a certain art of a richtextbox. It will select text starting at location 10 for 100 characters
private Sub Command1_Click()
Dim X
RichTextBox1.SetFocus
RichTextBox1.SelStart = len(RichTextBox1.Text)
for X = 1 to 50
SendKeys "Add a new line " & X & vbCr
next X
DoEvents
RichTextBox1.Refresh
RichTextBox1.SelStart = 100
RichTextBox1.SelLength = 100
print len(RichTextBox1.Text)
End Sub
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|