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.
Printable View
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.
throw a microsoft RichTextBox control on your form and add this code:
Code:Private Sub Form_Load()
RichTextBox1.LoadFile MYFILE, Rtf
End Sub
Thanks for the tip, however for some reason this line
rtbMotd.LoadFile c:\test.txt, Rtf
returns an error.
Tips?
M.
You need to put quotes round the file path.
Ur a legend. thankyou.
For the flags:
rtfRTF - RichTextBox format
rtfText - regular text format
RichTextBox1.LoadFile MYFILE, rtfRTF
The flag Jop gave is wrong :rolleyes:.