Click to See Complete Forum and Search --> : MessageBox not showing message


qsystems
October 1st, 2005, 12:47 PM
The following is a section of a C# test program.

MessageBox.Show("Ha Ha",
"ThisBox",
MessageBoxButtons.OK,
MessageBoxIcon.Error);

It worked the way it should before. Since yesterday, it only shows "ThisBox", MessageBoxIcon (X), and the OK button without OK. The message "Ha Ha" does not show at all.

Any idea?

Thans in advance.

darwen
October 1st, 2005, 01:49 PM
Firstly, what have you changed ?

Secondly : and this is a shot in the dark : have you changed the app's threading model from STAThread to MTAThread ?

I.e. the threading attribute [STAThread] or [MTAThread] attached to the main method ?

Darwen.

qsystems
October 1st, 2005, 07:22 PM
I did not change anything as far as the environment goes. I ran the program with [STAThread] and then [MTAThread ], and finally without any. Same result.

I then pulled out other programs that had MessageBox (and ran in the past). All of them stopped displaying messages in the Message Box.

Weird.

This is the entire listing:

using System;
using System.Windows.Forms;
namespace messageE
{
class Class1
{
static void Main(string[] args)
{

MessageBox.Show("Ha Ha",
"ThisBox",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}

qsystems
October 1st, 2005, 07:34 PM
The funny thing is I just got an email from another person who is having same problem.

jmcilhinney
October 1st, 2005, 08:51 PM
Installed any new McAfee software lately by any chance? If so, that's almost certainly the problem. There is a buffer overrun issue that causes visual data loss in .NET apps. There is a patch on the McAfee web site, I believe.

qsystems
October 2nd, 2005, 06:00 PM
As a matter of fact, I did re-install McAfee anti-virus software recently, but then Visual Studio.Net worked fine until a couple days ago. I went to the McAfee site but could not find references but it had links to Microsoft site, which addressed the buffer oferrun issue, but that the date is 2003!

MadHatter
October 2nd, 2005, 07:24 PM
its a known problem with macafee 8i. http://forums.mcafeehelp.com/viewtopic.php?t=32979 disable macafee's buffer overrun service from the virus scan console and the text will show up again.

there was a thread on here a while back (http://www.codeguru.com/forum/showthread.php?t=348718) about it.

qsystems
October 2nd, 2005, 08:29 PM
MadHatter,

That works! Thank you very much.