468,491 Members | 1,976 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,491 developers. It's quick & easy.

Startup Object Sub Main

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


Nov 20 '05 #1
4 3261
Hi,

Dim frm as New Form1
Application.Run(frm)

Ken
----------------------
"Shaurya Vardhan" <sh******@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2
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

"Shaurya Vardhan" <sh******@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #3
thats not a good way to do it, use application.run and applicationcontext to
set a main form.. then run the context

"Jeff Molby" <JeffMolby@C_mc_st.n_t> wrote in message
news:ej**************@TK2MSFTNGP09.phx.gbl...
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

"Shaurya Vardhan" <sh******@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
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


Nov 20 '05 #4
Thank you. I learn something every day.

"Brian Henry" <br******@adelphia.net> wrote in message
news:Oe****************@tk2msftngp13.phx.gbl...
thats not a good way to do it, use application.run and applicationcontext to set a main form.. then run the context

"Jeff Molby" <JeffMolby@C_mc_st.n_t> wrote in message
news:ej**************@TK2MSFTNGP09.phx.gbl...
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

"Shaurya Vardhan" <sh******@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
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



Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by cefrancke | last post: by
4 posts views Thread by Tony Vitonis | last post: by
4 posts views Thread by Chris Ashley | last post: by
4 posts views Thread by Johnnie Miami | last post: by
10 posts views Thread by Bernie Hunt | last post: by
8 posts views Thread by cj | last post: by
10 posts views Thread by =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.