Skip to content

Open Another Form and Close Itself using vb.net

Eliza Albert

Asked Aug 16, 2005, 5:37 AM EDT1 answer
Share
LinkedInX
Hye Guys,


i have some problem to closing parent form when i open a child form with in it. suppose you have 
login splash window when you enter correct password then you goto main screen by closing the 
login splash window. when i use close/dispose method for form closing then my whole project 
become closed. the only i used to go main screen is to hide login splash and move to main screen.
when i exit the main screen the login splash window remain in memory. how its possible when enter 
correct password login splash closed and move on to main screen. Becuase when i use hide login 
splash the instant remain in memory that not a good approach for moving next window. i think you 
best understand my point.

Thanks

Eliza

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    hi eliza

    thats very easy
    you can go three ways

    1:
    set the startup form the main parent form no splash screen
    then in MainForm_Load method on load the main parent show the splash screen as a dialog.
    if the login garanted close the splash and continue the project and if failed do as you want to do.

    2:
    start the project with Sub Main()
    in the Sub Main method show the splash as a dialog and if user garanted show the main paren as a dialog
    and close the splash

    3: 
    you can hide the splash screen and if main parent form closed type keyword 'End'.
    and all the project will be closed.

    if your problem didnt solve tell me please.

    thanx Amin;
    0