473,322 Members | 1,540 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,322 software developers and data experts.

Form Closing on its own

OK, this is bizarre. I have used this method many times before and it
never did this. The code is:

Dim myFrm as New Form1
myFrm.ShowDialog()

Normally, this opens the form and freezes the calling one until myFrm
closes. However, not any more. The form opens. I interact with it and
then it goes off on a long process. When finished, it closes itself and
the previous form becomes active again.

What on earth is wrong?? Thanks!

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #1
3 1042
"Daniel" <da****@madridmadridsoleado.com> schrieb
OK, this is bizarre. I have used this method many times before and
it never did this. The code is:

Dim myFrm as New Form1
myFrm.ShowDialog()

Normally, this opens the form and freezes the calling one until myFrm
closes. However, not any more. The form opens. I interact with it
and then it goes off on a long process. When finished, it closes itself
and the previous form becomes active again.

What on earth is wrong?? Thanks!


Maybe you set the dialogresult property of the button starting the long
running process?
To find out the cuase: Set a breakpoint in the Form's Closed event and, when
it's reached, have a look at the callstack.

Armin

Nov 21 '05 #2
"Daniel" <da****@madridmadridsoleado.com> schrieb:
OK, this is bizarre. I have used this method many times before and it
never did this. The code is:

Dim myFrm as New Form1
myFrm.ShowDialog()

Normally, this opens the form and freezes the calling one until myFrm
closes. However, not any more. The form opens. I interact with it and
then it goes off on a long process.


Can cou describe the "long process" in more detail?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
Armin Zingler wrote:
"Daniel" <da****@madridmadridsoleado.com> schrieb
OK, this is bizarre. I have used this method many times before and
it never did this. The code is:

Dim myFrm as New Form1
myFrm.ShowDialog()

Normally, this opens the form and freezes the calling one until myFrm
closes. However, not any more. The form opens. I interact with it
and then it goes off on a long process. When finished, it closes itself
and the previous form becomes active again.

What on earth is wrong?? Thanks!

Maybe you set the dialogresult property of the button starting the long
running process?
To find out the cuase: Set a breakpoint in the Form's Closed event and,
when it's reached, have a look at the callstack.

Armin


Thanks, that was it! it was set to cancel. No idea when i set it
though. Thaaaaaaaannnnnkkkkkssssssss!!!!!!

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #4

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

Similar topics

3
by: ThunderMusic | last post by:
Hi, I'm trying to have a MSN Messenger like form/app closing behavior. When I click on the X button, I only want the form to disappear and when I double-click on the notify icon or right-click...
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
1
by: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the...
2
by: Nenad Dobrilovic | last post by:
Hi, is there any way to find out how form was closed (by calling it's method Close() or by clicking on the 'close' button in control box)? Also, can I close the form in that way that Cloing/Closed...
6
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
1
by: **Developer** | last post by:
When I get a closing event in a MID Child form I don't know if the child form is closing or the main form is closing. Is there a way to tell? Thank
6
by: **Developer** | last post by:
I've been looking but can't find out how in a form Closing event to know if the closing is because the form's "X" had been clicked or the main form's "X" was clicked. That is, I need to know if...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
19
by: rbrowning1958 | last post by:
Hello, I am confused by dispose etc. and hope someone can set me right. 1. The Dispose(Bool) the IDE generates for a form has nothing to do with IDisposable, right? 2. So when is this called?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.