Using Shell()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ken Miller

    Using Shell()

    Hi all. I'm fairly new to programming, and have started using visual
    basic.net, just found this place, so hope someone can help as I'm a little
    stuck :)

    I'm trying to write a small front end to an application, now this was going
    fine up until this morning, where I had to send the parameters to the actual
    app. I have this:

    Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MenuItem2.Click

    If OpenFileDialog1 .ShowDialog = DialogResult.OK Then

    TextBox1.Text = OpenFileDialog1 .FileName

    ProcID = Shell("C:\WINDO WS\pscp.EXE", AppWinStyle.Nor malFocus)

    What would be the correct way of sending the contents of TextBox1.Text (the
    path to the file to be used) to Shell? The help doesnt really mention this
    at all.

    Thanks heaps for your help

    Ken


  • Randy Birch

    #2
    Re: Using Shell()

    This is really a VB 'classic' group, so you may want to hang out with the
    dotnetters on the msnews server, e.g one of these or other similarly-named
    groups devoted exclusively to .net programming:

    news://msnews.microsoft.com/microsof...dotnet.general
    news://msnews.microsoft.com/microsof...t.languages.vb
    news://msnews.microsoft.com/microsof....vsnet.general

    --

    Randy Birch
    MVP Visual Basic

    Please respond only to the newsgroups so all can benefit.


    "Ken Miller" <ken@NEIN.metaS PAMhusky.net> wrote in message
    news:cb00rq$sej $1@sparta.btint ernet.com...
    : Hi all. I'm fairly new to programming, and have started using visual
    : basic.net, just found this place, so hope someone can help as I'm a little
    : stuck :)
    :
    : I'm trying to write a small front end to an application, now this was
    going
    : fine up until this morning, where I had to send the parameters to the
    actual
    : app. I have this:
    :
    : Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
    : System.EventArg s) Handles MenuItem2.Click
    :
    : If OpenFileDialog1 .ShowDialog = DialogResult.OK Then
    :
    : TextBox1.Text = OpenFileDialog1 .FileName
    :
    : ProcID = Shell("C:\WINDO WS\pscp.EXE", AppWinStyle.Nor malFocus)
    :
    : What would be the correct way of sending the contents of TextBox1.Text
    (the
    : path to the file to be used) to Shell? The help doesnt really mention this
    : at all.
    :
    : Thanks heaps for your help
    :
    : Ken
    :
    :

    Comment

    Working...