|
-
Feb 7th, 2003, 07:52 AM
#1
Thread Starter
Hyperactive Member
Process.Start - what's going wrong? *[RESOLVED]*
Im using this to get a file from a dynamically created Treeview:
VB Code:
CodeDirectory = e.Node.Parent.Text
code = "code\" & CodeDirectory & "\" & e.Node.Text & ".rtf"
and lets say the parent node is Windows & Forms, and the RichText File is called Form Layout.rtf. I have the chosen .rtf displayed in a richtextbox. I want to be able to launch WordPad with the chosen RichText from the RichTextBox (still with me?)
(F:\My Programs\VB.NET\VBCodebook\Code) is the known application startup path
Basically, I want to launch WordPad and automatically load <known path>\Windows & Forms\Form Layout.rtf
I thought this would do it:
VB Code:
Prcess.Start("WordPad.exe", code)
code holding the full path and filename. But it's giving an error stating that it can't find:
F:\My Programs\VB.NET\VBCodebook\Code\Windows
As you can see, it seems to be stopping at the first space in the folder name.
If anyone has any ideas how to get around this (or anyone knows what the hell i'm talking about!) could you please help.
Last edited by RealNickyDude; Feb 7th, 2003 at 10:31 AM.
-
Feb 7th, 2003, 09:35 AM
#2
Thread Starter
Hyperactive Member
Ok, i've figured out what's wrong, it's WordPad, I needed to turn the contents of a string variable into an actual "string" (with quotes) in order for WordPad to correctly identify it.
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
|