Search code examples
vb.netinno-setupassociated-types

How can I detect if a file of associated type has started my application? vb.net


I am using inno setup and I made an associated file type so that my app starts when a user double clicks an associated file. But how can I know if the application was started by a file so I can show the file? For now, my app simply starts running.


Solution

  • The filename is the first argument passed to your Application. You can (and must) handle it, there are several ways to access this in .net, e.g. with Environment.GetCommandLineArgs.