471,350 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

MessageBox shuts down program

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

Jan 19 '06 #1
5 1387
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<br************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Jan 19 '06 #2
Hi,

<br************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 19 '06 #3

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uP**************@tk2msftngp13.phx.gbl...
| Hi,
|
| <br************@gmail.com> wrote in message
| news:11**********************@g49g2000cwa.googlegr oups.com...
| > 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.
Jan 19 '06 #4
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.

<br************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Jan 20 '06 #5
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 :)
Jan 20 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Chen, Mao | last post: by
2 posts views Thread by dday76 | last post: by
5 posts views Thread by Henry Stockbridge | last post: by
oll3i
reply views Thread by oll3i | last post: by
2 posts views Thread by =?Utf-8?B?YW5ub3llZCB3aXRoIHZpc3Rh?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.