|
-
July 12th, 2005, 01:21 PM
#1
[RESOLVED] MessageBox completely blank?
Hi,
I'm just starting to look at C#, and in trying some samples, I have a strange problem - perhaps it's just this machine (I'll try it at home later).
I create a simple Windows Application and on the form I place one button.
In the event handler for the button, I simply put:
Code:
MessageBox.Show("Hello");
The message box pops up, but it is completely blank! Title bar is the correct color, background is the correct color, button is present (but no OK or any other text on the button), no text in the message box and no text in the title bar.
If I change it to
Code:
MessageBox.Show("Hello", "Test Dialog");
then the title bar will show "Test Dialog" properly.
Any clues?
(Windows XP, SP1, all critical updates).
Thanks.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
July 12th, 2005, 01:27 PM
#2
Re: MessageBox completely blank?
I have that same problem on my laptop here at work. I figured it was a video driver issue. it actually happens on other window controls. I've found that if I open up a modal child and move it over the window that has the same behavior that the text shows back up.
I have the same setup & would be interested in finding out as well.
-
July 12th, 2005, 02:35 PM
#3
Re: MessageBox completely blank?
Just a thought - is a updated version of .net framework installed? Maybe you can try reinstalling that?
-
July 12th, 2005, 03:12 PM
#4
Re: MessageBox completely blank?
i'm running 1.1 sp1 (latest & greatest for .net) here.
-
July 12th, 2005, 03:47 PM
#5
Re: MessageBox completely blank?
Yes, unfortunately, I'm completely up to date with all SPs and the latest .NET framework.
Thanks, anyway.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
July 12th, 2005, 05:22 PM
#6
Re: MessageBox completely blank?
I tend to do this :
Code:
MessageBox.Show("Hello", System.Windows.Forms.Application.ProductName);
Which means if the assembly product name is set to an appropriate value in the application (it's in the "AssemblyInfo.cs" file) then the message box always picks up the correct title.
Darwen.
-
July 12th, 2005, 06:33 PM
#7
Re: MessageBox completely blank?
this is what it looks like:

notice that the main form is painted correctly but the messagebox is not. the title shows up but the content and button name do not.
-
July 12th, 2005, 06:39 PM
#8
Re: MessageBox completely blank?
I've not seen this problem : but I don't pass "this" into the call to Show()
Darwen.
-
July 12th, 2005, 06:54 PM
#9
Re: MessageBox completely blank?
Well, I've tried it on my laptop at home, and it works properly there. It must be somthing with the office machine (or the way IT has the restrictions on something set).
Thanks for the feedback (and the tip on the application name).
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
July 13th, 2005, 02:07 PM
#10
Re: MessageBox completely blank?
Do you happen to be running Mcafee virus scan or any other Mcafee products? I had the same problem on a pc at school which was recently updated with the newest mcafee virus scanner. The weirdest thing was the message box would come up blank like that if mcafee was running and if I killed mcafee, the message box would work fine. I have no idea how mcafee could effect the message box, but it seemed to here.
-
July 13th, 2005, 02:19 PM
#11
Re: MessageBox completely blank?
that is absolutely the case. very odd indeed. disabling the buffer overflow protection gets it back online.
guess somethings going wrong there. wonder if its win32 or .net?
looks like I have some sherlock holmes work to do
-
July 13th, 2005, 02:28 PM
#12
Re: MessageBox completely blank?
Glad to help. If you figure it out let us know, because as you said, it is very odd.
-
July 13th, 2005, 03:51 PM
#13
Re: MessageBox completely blank?
That's interesting, because on my office machine, we have McAfee (and cannot disable it), whereas on my home machines I use Norton and don't have the problem.
Thanks for the info.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
July 13th, 2005, 04:38 PM
#14
Re: MessageBox completely blank?
I've got McAfee at home and at work (active scan turned on) and it's never failed for me yet.
Are you Windows Update-ing regularly ?
Darwen.
-
July 13th, 2005, 05:52 PM
#15
Re: MessageBox completely blank?
its not the "virus scanner" I work off of 2 - 3 machines here at work. they all have macaffee enterprise, but only my laptop has this buffer overflow protection service on it (its v8 the others are v7 and dont have that feature to them).
if I turn off that piece it shows up. from what I've read it most likely is seeing the system writing to memory and thinks its attempting a buffer overflow and disallows it. that or there is some slight problem with the way .NET implement the system's fonts. I havent had time to look at it.
my system is always up to date. the other machines are dev test machines and they are always tested daily to make sure they have the latest & greatests.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|