Startup CMD problems

  • Thread starter Thread starter John Veldthuis
  • Start date Start date
J

John Veldthuis

I want to pass some startup commands to my application using a shortcut. I have worked out how to do
this no problems at all. I have a module and in it a SUB Main. In Main I do the parsing of the
command line parameters and store what I need.
I the create a new instance of my form that I want by

DIM myForm as New Form1

And then open it by using

myForm.OpenDialog

I use OpenDialog because the program would quit otherwise and I want to wait for the main program to
finish first.

However I find that because I sometimes start my form hidden that the whole program runs perfectly
once and then as soon as it has the program quits.

Any suggestions? I would like to take the cmdline args on the Form_Load but cant see them there.
 
I'm not sure I totally understand your problem, but if you use
Application.Run(New myForm) in the Sub Main to show your form, your app will
not stop immediately.
 

Ask a Question

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.

Ask a Question

Back
Top