showdialog throws exception when closes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dim f As New frmWeb
f.ShowDialog(Me)
f.Dispose()
Annytime i call a diffrent form from my main form using showdialog, i get an
exception eror thrown when i close the form, but when i use f.show i don't
get any errors, i need the knew form to keep the focus until closed.

thank you
 
GATMAN said:
Dim f As New frmWeb
f.ShowDialog(Me)
f.Dispose()
Annytime i call a diffrent form from my main form using showdialog, i get an
exception eror thrown when i close the form, but when i use f.show i don't
get any errors, i need the knew form to keep the focus until closed.

What's the exception?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Anytime i use form.showdialog() instead of form.show() the following error
occurs,

An unhandled exception of type 'System.Runtime.InteropServices.SEHException'
occurred in system.windows.forms.dll

Additional information: External component has thrown an exception.

Then if i click the break button, "frmNetForm" is highlighted in the
debugger with the green arrow in the left column in the begining of my class,

Public Class frmNetForm
Inherits System.Windows.Forms.Form

The error always occurs when i close the form i called, it happens when i
call any of the other foms in the project using .showdialog.
 
GATMAN said:
Anytime i use form.showdialog() instead of form.show() the following error
occurs,

An unhandled exception of type 'System.Runtime.InteropServices.SEHException'
occurred in system.windows.forms.dll

Additional information: External component has thrown an exception.

Then if i click the break button, "frmNetForm" is highlighted in the
debugger with the green arrow in the left column in the begining of my class,

Public Class frmNetForm
Inherits System.Windows.Forms.Form

The error always occurs when i close the form i called, it happens when i
call any of the other foms in the project using .showdialog.

As I said before, please give a short but complete program which
demonstrates the problem.
 
Back
Top