MessageBox shuts down program

  • Thread starter Thread starter brianbasquille
  • Start date Start date
B

brianbasquille

Hello all,

Any reason why a program would simply shut down when a
MessageBox.Show() is issued?

Strange behaviour as the MessageBox never actually pops up.. but
running through the debugger shows it fails and shuts down at the line
when the MessageBox.Show() is issued.

Bear in mind i am working with GDI+

Any suggestions?

Regards,

BrianMessageBox.Show
 
When you day it fails, what do you mean? Is an exception thrown? If
so, and it is not caught and handled, then it could very easily be that. If
it is an exception, what is it?

Hope this helps.
 
Hi,

Hello all,

Any reason why a program would simply shut down when a
MessageBox.Show() is issued?

Strange behaviour as the MessageBox never actually pops up.. but
running through the debugger shows it fails and shuts down at the line
when the MessageBox.Show() is issued.

Post the code in question
Bear in mind i am working with GDI+

What this has to do with the problem in hand?
 
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message | Hi,
|
| | > Hello all,
| >
| > Any reason why a program would simply shut down when a
| > MessageBox.Show() is issued?
| >
| > Strange behaviour as the MessageBox never actually pops up.. but
| > running through the debugger shows it fails and shuts down at the line
| > when the MessageBox.Show() is issued.
|
| Post the code in question
|
| > Bear in mind i am working with GDI+
|
| What this has to do with the problem in hand?
|

Bugs?

Willy.
 
Are you using .NET 1.1?

I have had trouble in the past (took 3 weeks to track down) with MessageBox
and the infamous "ParkingWindow" - a hidden window which is used by the
framework as a temporary parent if a control is initially created without a
parent. There is a bug in 1.1 framework where such controls do not always
get reparented correctly. Calling MessageBox blows away the ParkingWindow,
and such controls not correctly reparented can cause a crash as a result.
Seems to have been fixed in 2.0.

Search the newsgroups for my name and "ParkingWindow" for my postings on
that issue.
 
Hi,

| Post the code in question
|
| > Bear in mind i am working with GDI+
|
| What this has to do with the problem in hand?
|

Bugs?

Probably :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top