Results 1 to 4 of 4

Thread: Passing an argument to VB2005 application

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    43

    Passing an argument to VB2005 application

    Hello folks, Ive been working on a little app for a while now that is a poor-man's terminal emulator. I have a question - How do I capture an argument passed to the visual basic application? For example - my application allows you to save 'sessions' what I want to do is for the user of the application to pass an argument to the application that corresponds to their session name, and have it automatically load those settings and connect. All of the session settings are saved in an XML file.

    Any help would be stupendous.

  2. #2
    Frenzied Member Zakary's Avatar
    Join Date
    Mar 2005
    Location
    Canada, Quebec, Montreal
    Posts
    1,654

    Re: Passing an argument to VB2005 application

    Hi !
    Maybe Environment.GetCommandLineArgs
    is what you need

    Zak
    Using VS 2010 on Fw4.0

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2007
    Posts
    43

    Re: Passing an argument to VB2005 application

    Okay, that looks like it may work.. Im going to capture the argument as a variable in my vb app.. now what I need to do is search on that argument through my xml.. can I use a selectsinglenode with xpath to do this?

  4. #4
    Frenzied Member Zakary's Avatar
    Join Date
    Mar 2005
    Location
    Canada, Quebec, Montreal
    Posts
    1,654

    Re: Passing an argument to VB2005 application

    Sorry can't help you with XML node and stuff. But what you can do is to create a custom dataset, then store any info you which and invoke the WriteXml to it to a file, and the ReadXml to reload the information.
    Using VS 2010 on Fw4.0

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