Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Splash Screen to my program.
And when the splash end , exec the code

And it works but the splash screen go invisible and when i close the program by my custom exit button it's only closing the current form. But my splash screen is still hidden and appears the app name to task manager. How i can close that currently opened form and the invisible ones with my custom button ?
when i try to start debugging shows error

What I have tried:

C#
this.Hide();
frmLogin o = new frmLogin();
o.show();
Posted
Updated 25-May-20 12:17pm
v2
Comments
Maciej Los 25-May-20 16:33pm    
You're doing it wrong. You have to create another thread and display splash screen as long as main form is loading.
Do you want to display additional information on splash screen during loading progress?
Usarsef 25-May-20 16:48pm    
Now i have a splash screen with timer after it finish shows main form without problems
but after i start new debug shows this msg 'error while trying to run project could not load file or assembly file used by other process'

 
Share this answer
 
this.Hide();
frmLogin o = new frmLogin();
o.show();
o.Closed += (s, args) => this.Close();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900