CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Recieving a File Name from windows

    When you open a file from my computer or windows explorer the associated program starts and loads the file. How do you set up a visual basic application to handle this. I can associate my program with file types so that my application will start up when they are opened, but I don't know how to recieve the string of the filename so that I can do something with it. How do you handle this process?


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Recieving a File Name from windows

    Take a look at the Command Function, it returns a string containing the commandLine Passed to your application, if any, eg.

    private Form_Load()
    If len(Command) then MsgBox "You Entered the Following Command Line:" & vbCrLf & Command
    End Sub




    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Guest

    Re: Recieving a File Name from windows

    Excellent! Thank you very much Aaron!


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

Featured