By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

Form Closing on its own

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a
"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.