D
deko
I have a WinForms app that needs to take user input on open - before the
FormMain is displayed.
On the Form Load event of FormMain, I test for existence of an Access
database:
if (!File.Exists(Application.StartupPath +
"\\myAccess.mdb"))
If the mdb is not there, I need to open an input dialog form (with some
additional options) for selecting a different mdb:
FormDialogDifferentDatabase frmDialog =
new FormDialogDifferentDatabase();
frmDialog.Show();
How do I suspend execution of the code in the FormMain while the user
selects a different database? FormMain requires access to the database, so
I don't want to initialize it until it has a database. Should I put this
code in the constructor of FormMain?
Also, how do I get the user input from FormDialogDifferentDatabase? Do I
use DialogResult? I looked for examples of this but still confused...
Thanks in advance.
FormMain is displayed.
On the Form Load event of FormMain, I test for existence of an Access
database:
if (!File.Exists(Application.StartupPath +
"\\myAccess.mdb"))
If the mdb is not there, I need to open an input dialog form (with some
additional options) for selecting a different mdb:
FormDialogDifferentDatabase frmDialog =
new FormDialogDifferentDatabase();
frmDialog.Show();
How do I suspend execution of the code in the FormMain while the user
selects a different database? FormMain requires access to the database, so
I don't want to initialize it until it has a database. Should I put this
code in the constructor of FormMain?
Also, how do I get the user input from FormDialogDifferentDatabase? Do I
use DialogResult? I looked for examples of this but still confused...
Thanks in advance.