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

Problem displaying a new form

P: n/a
I want to display a new form (named as launchPuzzle2) to the user and I use
the following code : Dim nextStep As New launchPuzzle2

In an event handler where I want the window to appear, I write the following
code : nextStep.ShowDialog()

When I place the former code in the declaration part of the program and
start the program, Visual Studio seems to have entered debugging mode but the
program window never shows up. After a while a Just-in-Time debugging window
appears, telling me that a System.StackOverflowException was encountered and
prompted me to choose a program to debug the program.

Then I move that code to the line just before the latter line of code
appears and start the program again. So it becomes:

Dim nextStep As New launchPuzzle2
nextStep.ShowDialog()

This time the program window loads. Yet when I have reached the event
handler where the above code is located, the program stopped responding. Even
the Stop Debugging button in VS does not work - I have to use Task Manager to
terminate the program.

How can I fix this? Thanks.

--
Xero

http://www.chezjeff.net
My personal web portal
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There's probably something wrong in your launchPuzzle2 constructor/code
because the program crashes when you try to load the launchPuzzle2 form, so
maybe you could post some code.

Greetz Peter

"Xero" <jeff_@_chezjeff_._net(remove_underscores_and_this )> wrote in message
news:2D**********************************@microsof t.com...
I want to display a new form (named as launchPuzzle2) to the user and I use the following code : Dim nextStep As New launchPuzzle2

In an event handler where I want the window to appear, I write the following code : nextStep.ShowDialog()

When I place the former code in the declaration part of the program and
start the program, Visual Studio seems to have entered debugging mode but the program window never shows up. After a while a Just-in-Time debugging window appears, telling me that a System.StackOverflowException was encountered and prompted me to choose a program to debug the program.

Then I move that code to the line just before the latter line of code
appears and start the program again. So it becomes:

Dim nextStep As New launchPuzzle2
nextStep.ShowDialog()

This time the program window loads. Yet when I have reached the event
handler where the above code is located, the program stopped responding. Even the Stop Debugging button in VS does not work - I have to use Task Manager to terminate the program.

How can I fix this? Thanks.

--
Xero

http://www.chezjeff.net
My personal web portal

Nov 21 '05 #2

P: n/a
Sure. I've uploaded the file to the following address:

http://www.chezjeff.net/file_archive...Puzzle2-vb.txt

This txt file is about 300k. (Pretty large for a text file ... it has almost
ten thousand lines ...)

Thanks again.

Xero
"Peter Proost" wrote:
There's probably something wrong in your launchPuzzle2 constructor/code
because the program crashes when you try to load the launchPuzzle2 form, so
maybe you could post some code.

Greetz Peter

"Xero" <jeff_@_chezjeff_._net(remove_underscores_and_this )> wrote in message
news:2D**********************************@microsof t.com...
I want to display a new form (named as launchPuzzle2) to the user and I

use
the following code : Dim nextStep As New launchPuzzle2

In an event handler where I want the window to appear, I write the

following
code : nextStep.ShowDialog()

When I place the former code in the declaration part of the program and
start the program, Visual Studio seems to have entered debugging mode but

the
program window never shows up. After a while a Just-in-Time debugging

window
appears, telling me that a System.StackOverflowException was encountered

and
prompted me to choose a program to debug the program.

Then I move that code to the line just before the latter line of code
appears and start the program again. So it becomes:

Dim nextStep As New launchPuzzle2
nextStep.ShowDialog()

This time the program window loads. Yet when I have reached the event
handler where the above code is located, the program stopped responding.

Even
the Stop Debugging button in VS does not work - I have to use Task Manager

to
terminate the program.

How can I fix this? Thanks.

--
Xero

http://www.chezjeff.net
My personal web portal


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.