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

MessageBox quirk - msgbox.jpg (0/1)

P: n/a
Hi,

I have a problem with the message text and button text not showing up
in a messagebox. (See attachment)

The code I used to call this example was
MessageBox.Show(this,"Hello","nothing shown",MessageBoxButtons.OK,MessageBoxIcon.Informa tion);


I had this problem a couple of weeks ago when I was running Windows
2003 Server on my dev machine, and I put it down to an OS / Framework
problem. I have since rebuilt the dev machine with XP SP1 (SP2 has
never been near this build), and the problem is still here.

Immediate thoughts would be a graphiocs card driver problem, but
messageboxes from other commercial apps work fine.

I am confused. Can anyone help?
Nov 16 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
My newsreader software seems to have posted the image as a separate
post. Sorry about that.

I have just tried the windows standard drivers for the display in the
dev amchine and there was no improvement (I had done this bofore, but
I wanted to double check the result). Drivers don't seem to be the
issue, then.

(The compiled app runs fine on another machine, so it must be
something specific to my dev box.)
Nov 16 '05 #2

P: n/a
Hi Marc,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the text in the MessageBox is not
showing properly on your dev box. If there is any misunderstanding, please
feel free to let me know.

This problem seems to be machine specific. Could you try to reproduce it
with some simple steps?

1. Using the app wizard, create a new C# app. (Select "Windows Application"
in the New Project diailog.)
2. Drag and drop a button on the form.
3. Double-click on the button to generate an event handler for the button.
4. Enter the following line of code to the event handler:
MessageBox.Show("Hello!");
5. Run the application, and click the button which was added to the form.

If so, I think there might be something wrong with the .NET framework
installation. Could you try to re-install the .NET framework?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3

P: n/a
That is eactly what happens. Any time I call a message box (I can do
it on Form_Load, from a button, at startup, anywhere...) I get the
same result. The title of the messagebox is fine, the icon (if
specified) is ok, the outline of the button(s) is ok, but the text,
and button text do not show up.

I will try to re-install the framework, but this has happened on two
installations on the same box, from different media.

I'll keep trying, though.

On Sat, 13 Nov 2004 05:08:49 GMT, v-****@online.microsoft.com (Kevin
Yu [MSFT]) wrote:
Hi Marc,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the text in the MessageBox is not
showing properly on your dev box. If there is any misunderstanding, please
feel free to let me know.

This problem seems to be machine specific. Could you try to reproduce it
with some simple steps?

1. Using the app wizard, create a new C# app. (Select "Windows Application"
in the New Project diailog.)
2. Drag and drop a button on the form.
3. Double-click on the button to generate an event handler for the button.
4. Enter the following line of code to the event handler:
MessageBox.Show("Hello!");
5. Run the application, and click the button which was added to the form.

If so, I think there might be something wrong with the .NET framework
installation. Could you try to re-install the .NET framework?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Nov 16 '05 #4

P: n/a
Reinstalled the framework - no difference.
Reinstalled the framework from a different source - no change
removed video drivers to use windows default - no change
tried different version of the video driver - no change

Also, any items in a listbox control do not show up either. I am most
perplexed.

On Mon, 15 Nov 2004 09:46:16 +0000, Marc Jennings
<Ma**********@community.nospam> wrote:
That is eactly what happens. Any time I call a message box (I can do
it on Form_Load, from a button, at startup, anywhere...) I get the
same result. The title of the messagebox is fine, the icon (if
specified) is ok, the outline of the button(s) is ok, but the text,
and button text do not show up.

I will try to re-install the framework, but this has happened on two
installations on the same box, from different media.

I'll keep trying, though.

On Sat, 13 Nov 2004 05:08:49 GMT, v-****@online.microsoft.com (Kevin
Yu [MSFT]) wrote:
Hi Marc,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the text in the MessageBox is not
showing properly on your dev box. If there is any misunderstanding, please
feel free to let me know.

This problem seems to be machine specific. Could you try to reproduce it
with some simple steps?

1. Using the app wizard, create a new C# app. (Select "Windows Application"
in the New Project diailog.)
2. Drag and drop a button on the form.
3. Double-click on the button to generate an event handler for the button.
4. Enter the following line of code to the event handler:
MessageBox.Show("Hello!");
5. Run the application, and click the button which was added to the form.

If so, I think there might be something wrong with the .NET framework
installation. Could you try to re-install the .NET framework?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Nov 16 '05 #5

P: n/a
Hi,

Looks like the font used to display these texts (usually Tahoma) is messed
up, or the color for the text is set to the value of the background color.
Check it in the Appearance settings for your desktop. If the color is ok try
setting different font for the messageboxes. If this helps with the
messageboxes - try to replace the problematic (previous) font with the
original one in the Windows installation CD.

Hope this helps
Martin Dechev
ASP.NET MVP
"Marc Jennings" <Ma**********@community.nospam> wrote in message
news:7u********************************@4ax.com...
Reinstalled the framework - no difference.
Reinstalled the framework from a different source - no change
removed video drivers to use windows default - no change
tried different version of the video driver - no change

Also, any items in a listbox control do not show up either. I am most
perplexed.

On Mon, 15 Nov 2004 09:46:16 +0000, Marc Jennings
<Ma**********@community.nospam> wrote:
That is eactly what happens. Any time I call a message box (I can do
it on Form_Load, from a button, at startup, anywhere...) I get the
same result. The title of the messagebox is fine, the icon (if
specified) is ok, the outline of the button(s) is ok, but the text,
and button text do not show up.

I will try to re-install the framework, but this has happened on two
installations on the same box, from different media.

I'll keep trying, though.

On Sat, 13 Nov 2004 05:08:49 GMT, v-****@online.microsoft.com (Kevin
Yu [MSFT]) wrote:
Hi Marc,

First of all, I would like to confirm my understanding of your issue. Fromyour description, I understand that the text in the MessageBox is not
showing properly on your dev box. If there is any misunderstanding, pleasefeel free to let me know.

This problem seems to be machine specific. Could you try to reproduce it
with some simple steps?

1. Using the app wizard, create a new C# app. (Select "Windows Application"in the New Project diailog.)
2. Drag and drop a button on the form.
3. Double-click on the button to generate an event handler for the button.4. Enter the following line of code to the event handler:
MessageBox.Show("Hello!");
5. Run the application, and click the button which was added to the form.
If so, I think there might be something wrong with the .NET framework
installation. Could you try to re-install the .NET framework?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #6

P: n/a
Thanks. I tried, but there was no difference. I also checked the
exact size of the font file against a known good one, and it was the
same (message boxes from non-dotnet apps seem to work fine with Tahoma
as the default font)

On Mon, 15 Nov 2004 16:55:34 +0100, "Martin Dechev"
<de*******@hotmail.com> wrote:
Hi,

Looks like the font used to display these texts (usually Tahoma) is messed
up, or the color for the text is set to the value of the background color.
Check it in the Appearance settings for your desktop. If the color is ok try
setting different font for the messageboxes. If this helps with the
messageboxes - try to replace the problematic (previous) font with the
original one in the Windows installation CD.

Hope this helps
Martin Dechev
ASP.NET MVP

Nov 16 '05 #7

P: n/a
Hi Marc,

Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us
at 1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/default...d=sz;en-us;top. If this is not
an urgent issue and you would like us to create an incident for you and
have Microsoft Customer Service Representative contact you directly, please
send email to (remove "online." from this no Spam email address):
mailto:ds******@online.microsoft.com with the following information,

* Include "Followup: <Tomcat IssueID>" in the email Subject.
*Location of the post
*Subject Line
* First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #8

P: n/a
Just a wild guess, but you do have the STAThread attribute attached to the
Main method, do you? Some system dialogs require the calling thread to be in
STA and it is known to cause odd behavior if you leave the attribute out.

Regards,
Sami

"Marc Jennings" <Ma**********@community.nospam> wrote in message
news:tm********************************@4ax.com...
Hi,

I have a problem with the message text and button text not showing up
in a messagebox. (See attachment)

The code I used to call this example was
MessageBox.Show(this,"Hello","nothing
shown",MessageBoxButtons.OK,MessageBoxIcon.Informa tion);


I had this problem a couple of weeks ago when I was running Windows
2003 Server on my dev machine, and I put it down to an OS / Framework
problem. I have since rebuilt the dev machine with XP SP1 (SP2 has
never been near this build), and the problem is still here.

Immediate thoughts would be a graphiocs card driver problem, but
messageboxes from other commercial apps work fine.

I am confused. Can anyone help?

Nov 16 '05 #9

P: n/a
I am not 100% sure what you mean, to be honest. I assume you mean having
[STAThread] immediately prior to the Main method? if so, then yes, I do.

"Sami Vaaraniemi" wrote:
Just a wild guess, but you do have the STAThread attribute attached to the
Main method, do you? Some system dialogs require the calling thread to be in
STA and it is known to cause odd behavior if you leave the attribute out.

Regards,
Sami

"Marc Jennings" <Ma**********@community.nospam> wrote in message
news:tm********************************@4ax.com...
Hi,

I have a problem with the message text and button text not showing up
in a messagebox. (See attachment)

The code I used to call this example was
MessageBox.Show(this,"Hello","nothing
shown",MessageBoxButtons.OK,MessageBoxIcon.Informa tion);


I had this problem a couple of weeks ago when I was running Windows
2003 Server on my dev machine, and I put it down to an OS / Framework
problem. I have since rebuilt the dev machine with XP SP1 (SP2 has
never been near this build), and the problem is still here.

Immediate thoughts would be a graphiocs card driver problem, but
messageboxes from other commercial apps work fine.

I am confused. Can anyone help?


Nov 16 '05 #10

P: n/a
Ianhoc found the solution to this problem and posted it in a thread
entitled "MessageBox blank"
It seems McAfee Version 8 is the culprit - disable buffer overrun and all is
okay again.

Go figure!!


Fantastic. Thanks Ianhoc. (I only wish I could put back all the hair
I have torn out over this problem. :( )
Nov 16 '05 #11

P: n/a
There is a hotfix available from McAfee, and it fixes the problem.

I found it referenced at
http://www.devcity.net/forums/topic....d=79490&page=2

HTH

On Tue, 16 Nov 2004 10:42:32 +0000, Marc Jennings
<Ma**********@community.nospam> wrote:
Ianhoc found the solution to this problem and posted it in a thread
entitled "MessageBox blank"
It seems McAfee Version 8 is the culprit - disable buffer overrun and all is
okay again.

Go figure!!


Fantastic. Thanks Ianhoc. (I only wish I could put back all the hair
I have torn out over this problem. :( )


Nov 16 '05 #12

P: n/a
Hi Marc,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.