PDA

Click to See Complete Forum and Search --> : winapp closes!!!


Techno
Sep 1st, 2004, 01:16 PM
hi there!

this forum has it all! :D

i am making an app, this app has a console and a win app.

the console takes in parameters (switches). depending on the switch i call a method in the winform to execute and do its job.

however, i think it does execute it, either way the app just closes completly - no errors or anything.

why is this? how can i tell it not to close?

if I put in application.run(); in the winform - it shows, and doesnt close until you hit the close button on the window form.

how do i sort the problem?

i basically want it so that when i call a method from the console app to the winform, winform shows and does all its operations etc.. (like display progress bar or what not) and will exit once everything has been completed, or even just let it stay up after everything has been completed.

thanks! :)

skarho
Sep 1st, 2004, 09:35 PM
dunno if this helps but this kinda act as a splash. first off set the opacity of the form=0

private void Form1_Load(object sender, System.EventArgs e)
{
timer1.Start();
}

private void timer1_Tick(object sender, System.EventArgs e)
{
if(this.Opacity==1)
{
timer1.Stop();
timer2.Start();
}
else this.Opacity+=.05;
}

private void timer2_Tick(object sender, System.EventArgs e)
{
if(this.Opacity==0)
{
timer2.Stop();
this.Close();
}
else this.Opacity-=.05;
}

it also mention about closing after the opacity turns 0. hope this rings a bell.