Question How to know the calling filename ?

SergeD

Member
Joined
Oct 25, 2007
Messages
10
Programming Experience
10+
Hello everybody,

A .net test.exe file is created and a file xyz.abc is created

Right-click xyz.abc, select Properties, click on Change button, click on Browse button and select the test.exe file.

When xyz.abc is double clicked the test.exe will open.

Is it possible to know in test.exe if it has been loaded from xyz.abc ?

Thank you,

Serge
 
Use the shared Environment.GetCommandLineArgs() method, it returns a string array of the arguments that were used to start the application. There is also My.Application.GetCommandLineArgs
 
Back
Top