473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

showdialog throws exception when closes


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
Jul 21 '05 #1
3 2696
GATMAN <GA****@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2

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.


"Jon Skeet [C# MVP]" wrote:
GATMAN <GA****@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
GATMAN <GA****@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tomasz Naumowicz | last post by:
Hello Everybody, I have the following problem with Socket: Socket.Available reports data in the buffer (e.g. 1849 bytes) but I can't read it because Socket.Read throws an exception The...
5
by: Josh Golden | last post by:
3 forms. form 1, when button clicked instantiates form 2 which opens but is not shown. form 2 instantiates form 3 as showdialog. form 3 finishes, raises an event that form 2 catches. during the...
4
by: Strahimir Antoljak | last post by:
I keep an ArrayList in the external class. The external class is passed into a form via New constructor (see below). I process some data with functions within the form before showing the form. I...
1
by: No Sheds | last post by:
Hi I have an MDI application. I have a MDI child window within this application that shows another form using ShowDialog. This works fine, except that the final form shown with ShowDialog...
4
by: trialproduct2004 | last post by:
Hi all I am new to vb.net application. I am using showdialog property of form to display form. First time it is working properly. But next time it is giving me error that ' object reference not...
3
by: GATMAN | last post by:
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...
4
by: randy1200 | last post by:
I have a SideForm. If the use presses a button on the main form, the side form comes up by executing the following: SideForm sf = new SideForm() sf.ShowDialog(); This works perfectly. I've...
2
by: =?Utf-8?B?a2VubmV0aG1Abm9zcGFtLm5vc3BhbQ==?= | last post by:
vs2005, c# Trying to understand why one way works but the other doesnt. I have not tried to create a simpler mdi/child/showdialog app for posting purposes (I think even this would not be so small...
6
by: NVergunst | last post by:
I have a main form, then this form spawns another form (Form A) as a form.showdialog(). That dialog box then has a button that spawns another form (Form B) through the form.showdialog(). All of this...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.