Startup Object Sub Main

  • Thread starter Thread starter Shaurya Vardhan
  • Start date Start date
S

Shaurya Vardhan

Hi,
I have to launch my Application after receiveing arguments from outside.
And Sub Main has to be the start up object.
Depending upon the Arguments, a for has to be launched.

After I lauch the form, the application terminates itself when the control
comes out of sub Main.

I want that, the form launched be there. How to go for it.

Thanks in Advance...

Shaurya
 
I'm not sure I understood your question properly, but I'm guessing that your
form is closing right after it opens and that you want it to open and stay
up until the user closes it. If that's the case, I believe you need to Dim
the form outside of Sub Main().

For example:

Dim frm as Form1

Sub Main() 'Should work
frm = new Form1
frm.Show()
End Sub

Instead of:

Sub Main() ' Will flash and then disappear
Dim frm as Form1
frm = new Form1
frm.Show()
End Sub

HTH
 
thats not a good way to do it, use application.run and applicationcontext to
set a main form.. then run the context
 
Thank you. I learn something every day.

Brian Henry said:
thats not a good way to do it, use application.run and applicationcontext to
set a main form.. then run the context
 
Back
Top