Loading Form Beofre Loading the MainForm

G

Guest

Hi,

I'm writing a windows application and i need to check if a certain file
exsits before i'm loading my MainForm.
Incase the file doesn't exsit, i want to load a different form (without
loading my MainForm) and after the user pressed the ok button and the file
was created then to load my MainForm. Incase that the file exsits i want to
load my MainForm Directly.

How can I do it?

Thanks,
Gidi.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


I think this may help you:

[STAThread]
static void Main()
{
if ( flag )
Application.Run(new Form1());
else
Application.Run(new Form2());
}


cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top