Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Sub main

Status
Not open for further replies.

Govnor

Technical User
Sep 3, 2002
55
GB
Hi all,

I am a VB6 developer, so please excuse the simplicity of this question.

I have set my application to start with sub main(). so that it loads a form.

in .net this is not happening. The form appears and closes again. I do not understand how to get around this???

I know garbage collection destroys all classes not in use. The problem is this class is waiting for use.

Have I made this any clearer? Please help.

the VB6 equivalent would be:

Sub Main
'stuff before
load frmsystray
'stuff after
end sub

thanks in advance for any help offered.
 
You need to use ShowDialog instead of Show

DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
Thanks, I will try that out. I am sure it will work

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top