473,478 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MessageBox quirk - msgbox.jpg (0/1)

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
12 1429
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1781
by: Larry Pits | last post by:
Hi All, I just want to display a message using msgbox() and I keep on getting this error message. It is invalid to show a modal dialog or form when the application is not running in...
4
9543
by: Steve | last post by:
Does anyone know of a way to open a messagebox over a popup form opened in acDialog mode? Thanks for any ideas! Steve
3
8352
by: Hans Kamp | last post by:
How do I use an MsgBox in C#Builder? The following code: private void button1_Click(object sender, System.EventArgs e) { MsgBox("Blablabla"); } causes the message (translated from Dutch):
10
2319
by: Russ | last post by:
I've been trying to figure out how to show a simple messagebox with an OK button in my web client program (C#). I have looked at every reference to JScript and MessageBox that seemed even remotely...
7
1407
by: MadCrazyNewbie | last post by:
Hey Group, Sorry to be a pain again but i have the following code: If MessageBox.Show("Are Your Sure You Want To Send This Email?", "Are Your Sure You Want To Send This Email?",...
5
9148
by: roberto | last post by:
Hi at all i have a web application (in vb.net), and i want to use a message box control like System.Windows.Forms.MessageBox control, to show simple messages . I used this but vb.net said me an...
6
11138
by: Richard | last post by:
Hi, Both does the same thing(atleast for me). Which is preffered to use in vb.net and why. RC
4
9857
by: Prabhudhas Peter | last post by:
Can Any one explain me what is the Difference between MsgBox and MessageBox.Show... In VB6 i used MsgBox, So Can I Say "MessageBox.Show" is the new version of MsgBoz which belongs to C# or VB --...
3
4027
by: Luis Alvarado | last post by:
Hello everybody, I am new programming in asp.net, recently I have been hired in a company and they were creating a simple application, this application is developed in asp.net 2 visual Studio 2005...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7067
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6719
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4757
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4463
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.