Results 1 to 5 of 5

Thread: [RESOLVED] Open multiple files without starting multiple instances (Application.CommandLineArgs)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    774

    Resolved [RESOLVED] Open multiple files without starting multiple instances (Application.CommandLineArgs)

    I have a program that handles a particular (custom) filetype and I can start my program by double-clicking on an associated file. I use My.Application.CommandLineArgs to get the name of the file that was clicked and this is then loaded. If the user clicks on a file when the program is already running, a second instance of the app is started and the second file is loaded. I would like just one instance of the app to run and for multiple files to be loaded into it. I can detect if my app is running with something like Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName) but I don't seem able to retrieve the name of the file that was clicked under those circumstances. Any pointers towards getting the name of the file that was clicked when my app is already running?

    Thanks.
    Last edited by paulg4ije; Mar 31st, 2013 at 03:49 PM.

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