View Single Post
Old May 11th, 2006, 12:46 PM   #4
Jason Isom
Programmer
 
Join Date: Dec 2005
Posts: 53
Rep Power: 3 Jason Isom is on a distinguished road
Can you try doing something like this:

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            if (File.Exists(@"C:\FOO.TXT"))
            {
                MessageBox.Show("File Exists!");
                DoSomething();
            }
            else
            {
                this.Hide();
                using (Form2 frm = new Form2())
                {
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        DoSomethingElse();
                    }
                }
                this.Show();
            }
            
        }

        void DoSomething() { }
        void DoSomethingElse() { }
    }
}

I apologize for all the generic names, I'm on my lunch break from work.
Jason Isom is offline   Reply With Quote