Question Open With

Tmann

Member
Joined
Jun 24, 2011
Messages
8
Programming Experience
5-10
Afternoon All, Just a quick question, I have created an application that opens log files, currently it works fine although only via drag and dropping files onto the app or via clicking open and via the file dialog choosing the file. my issue relates to I've now selected these log files and right clicked them and selected "open with" (Inside windows explorer) and then browsed to my app, so now when i double click these log files my application opens but it is not loading the files because which ever event fires which passes in the file path I'm not handling, any pointers or help in regards to the event I need to handle would be appreciated Cheers
 
Commandline arguments is available from application Startup event (e.CommandLine), or using Environment.GetCommandLineArgs or My.Application.CommandLineArgs.
 
Thanks, that is exactly what I needed, as a follow up to my original question, if i double click a file it opens in my application now, if i select multiple files and select open, i would expect that it would still open only one copy of my application and submit multiple command line args but what I am seeing is that Im getting multiple copies of my application opening with only a single command line arg per instance. In a wpf application is there a way to get the expected behaviour (ie one application with multiple command line args) via a compile option or similar to enforce a single instance ?
 
Yeah Thanks had already searched for wpf single instance, the solutions ive found so far rely on referencing winforms dlls which isnt the route i wanted to take if possible, anyways in regards to the original question thanks for the assistance.
 
Back
Top