|
-
Nov 29th, 2000, 05:38 AM
#1
Thread Starter
Member
Hello,
If i have a text box (Or RTf box as the case may be) how do i go about reading the contents of a either *.rtf or *.txt file on form initialisation? I want the output to appear in the txtbox on my form.
Any ideas anyone?
regards
M.
-
Nov 29th, 2000, 05:49 AM
#2
Frenzied Member
throw a microsoft RichTextBox control on your form and add this code:
Code:
Private Sub Form_Load()
RichTextBox1.LoadFile MYFILE, Rtf
End Sub
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 29th, 2000, 06:14 AM
#3
Thread Starter
Member
Thanks for the tip, however for some reason this line
rtbMotd.LoadFile c:\test.txt, Rtf
returns an error.
Tips?
M.
-
Nov 29th, 2000, 06:30 AM
#4
Hyperactive Member
You need to put quotes round the file path.
-
Nov 29th, 2000, 06:33 AM
#5
Thread Starter
Member
-
Nov 29th, 2000, 07:22 AM
#6
For the flags:
rtfRTF - RichTextBox format
rtfText - regular text format
RichTextBox1.LoadFile MYFILE, rtfRTF
The flag Jop gave is wrong .
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
|