Messagebox.Show ignores my call

  • Thread starter Thread starter Allan Ebdrup
  • Start date Start date
A

Allan Ebdrup

When I try to Messagebox.Show() a string that is 197680 or more chars long,
my call is simply ignored, no error is thrown, the call is simply ignored.
197679 chars or shorter is shown correctly. Is it a XP or dotNet bug?
Kind Regards,
Allan Ebdrup
 
Hi,

Upon a string class lenght is set to UInt32, actually is not real, it has a
much limited number, I found a very interesting page about strings.

http://www.codeproject.com/dotnet/strings.asp

Anyway, back to your case, it seems that the message box has a limit on the
amount of data that can show, this seems to be normal, otherwise imaging a
hugh message box with 2Mb of string data!

Best regards
Salva
 
Salvador said:
Hi,

Upon a string class lenght is set to UInt32, actually is not real, it has
a
much limited number, I found a very interesting page about strings.

http://www.codeproject.com/dotnet/strings.asp

Anyway, back to your case, it seems that the message box has a limit on
the
amount of data that can show, this seems to be normal, otherwise imaging a
hugh message box with 2Mb of string data!

Well it shouldn't just ignore the call, it could show only a substring or
throw an error. Just ignoring the call must be a bug.

Kind Regards,
Allan Ebdrup
 
Hi,

I guess it should be a winapi error, in any case that huge amount of text
is not practical to show in a messagebox dialog, I even can bet you that
they do not fit in the screen

Why you need to show that many characters in the first place?
cheers,
 
Ignacio Machin ( .NET/ C# MVP ) said:
I guess it should be a winapi error, in any case that huge amount of text
is not practical to show in a messagebox dialog, I even can bet you that
they do not fit in the screen

Why you need to show that many characters in the first place?
cheers,

I simply wanted to show some XML that a methodcall returned, and all of a
sudden the messagebox didn't appear, but the code was running without
errors, naturally I was confused so I examined the problem and found what I
wrote in my original mail.
I would expect an error to be thrown in case of some kind of overflow.

Kind Regards,
Allan Ebdrup
 
Back
Top