|
-
Dec 5th, 2002, 04:39 PM
#1
Thread Starter
Junior Member
Loading a textfile *[RESOLVED]*
I wish to load a textfile into a richtextbox, but i'm not sure how to get the relevant path.
The textfile is situated in a 'data' folder where the program is situated. In VB6, you could have:
VB Code:
rtbAbout.FileName = App.Path & "\data\about.rtf"
but there's no app.path in VB .NET, how would I get the relevant path to the textfile?
Thanks
Last edited by NickyDude; Dec 6th, 2002 at 10:20 AM.
-
Dec 5th, 2002, 04:43 PM
#2
Registered User
-
Dec 5th, 2002, 04:49 PM
#3
Thread Starter
Junior Member
Thanks!!
[newbie, me?]
-
Dec 5th, 2002, 08:51 PM
#4
yay gay
just put "\data\file.txt" i think
\m/  \m/
-
Dec 6th, 2002, 12:08 AM
#5
Sleep mode
define the path and then call the method like this
VB Code:
Imports System.Reflection
dim the_path as string =system.Windows.Forms.Application.StartupPath
RichTextBox1.LoadFile(the_path,richTextBoxStreamType.PlainText)
-
Dec 6th, 2002, 12:14 AM
#6
Sleep mode
-
Dec 6th, 2002, 10:20 AM
#7
Thread Starter
Junior Member
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
|