How do I start debugging this?

  • Thread starter Thread starter David Berman
  • Start date Start date
D

David Berman

I have a C# Windows Forms based application. I have a form which serves
as a menu (it has push buttons on it). When I click a push button, it
launches a window with this code:

private void button1_Click(object sender, System.EventArgs e)
{
ImportDataFrom formImportData = new formImportdata();
formImportData.Show();
}

When the code hits the .Show() call, the entire developer studio
freezes. I tried to step into it but no luck. I did step into the
constructor for formImportdata and it seems to have initialized all of
the controls and everything ok. Where do I start here?

Also, it doesn't freeze if I run the program, only under the debugger.

Should it matter that I copied the project from a different machine onto
this one?

Also, the main menu form opens other forms allright and they work fine,
so something about this one seems to be siezing up devstudio.

Thank you!

Dave





Meet people for friendship, contacts,
or romance using free instant messaging software! See a picture you
like? Click once for a private conversation with that person!

www.SEN.us
 
Try

private void button1_Click(object sender, System.EventArgs e)
{
ImportDataFrom formImportData = new ImportDataFrom(); // not "new
formImportData"
formImportData.Show();
}
 
Thank you Richard! That worked!

I'll go and read up on the difference between Show() and ShowDialog()
now.

David



Meet people for friendship, contacts,
or romance using free instant messaging software! See a picture you
like? Click once for a private conversation with that person!

www.SEN.us
 
Back
Top