Results 1 to 2 of 2

Thread: Process.Start - what's going wrong? *[RESOLVED]*

  1. #1

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435

    Thumbs up Process.Start - what's going wrong? *[RESOLVED]*

    Im using this to get a file from a dynamically created Treeview:

    VB Code:
    1. CodeDirectory = e.Node.Parent.Text
    2. 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:
    1. 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.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  2. #2

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    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.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width