That's right, I started an app. from command line, then inside this app
I start a new instance of the same app. When this new instance starts,
for some reason it thinks it got started from command line even though I
start this new app on a new thread.
That's right, I started an app. from command line, then inside this app
I start a new instance of the same app. When this new instance starts,
for some reason it thinks it got started from command line even though I
start this new app on a new thread.
Application.Run does not start a new instance. Application.run contains the
message loop keeping the Thread alive and handling the messages send to it.
This is not a new application (AKA process). It's only a new thread in the
same process.
Within the thread, don't refer to the command line arguments but to the data
passed to the thread. If you want to have only one thread work with the
command line arguments, pass the arguments only to the first thread in sub main.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.