Messagebox.Show refresh

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a C# application I use a message box to display an error.
It is a library MessageBox.Show. It has a Okey button.
Sametimes button label and other label are displayed blank ???
In this case I change application (Alt+Tab) and when I came back messagebox is
correct displayed.

Thank you.
 
Are you showing the message box from a worker thread?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

In a C# application I use a message box to display an error.
It is a library MessageBox.Show. It has a Okey button.
Sametimes button label and other label are displayed blank ???
In this case I change application (Alt+Tab) and when I came back messagebox is
correct displayed.
 
This is code that produce the error:

// Memorizzazione dati
try
{
DwcSociLista.UpdateData();
DwcSociVariazioni.UpdateData();
IFrmMain.TrsMain.Commit();
IntUpdateStatus = 1;
if (IntUpdateMessage2 == 0)
// This is messagebox that not refrash !!!
MessageBox.Show("Dati Memorizzati", Text, MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
}
catch
{
MessageBox.Show("Errore in memorizzazione dati", Text,
MessageBoxButtons.OK, MessageBoxIcon.Error);
DwcSociLista.Focus();
return;
}

It happens only in a PC ... so I had yet changed HW and SW but the behavior
don't change.
 
That may well be the code that produces the error but I have no context to be able to understand what is taking place. You also don't say which message box has the problem. Can you reproduce the error in a preferably short, compilable sample so I can see the error on my machine and debug it to work out what is happening.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

This is code that produce the error:

// Memorizzazione dati
try
{
DwcSociLista.UpdateData();
DwcSociVariazioni.UpdateData();
IFrmMain.TrsMain.Commit();
IntUpdateStatus = 1;
if (IntUpdateMessage2 == 0)
// This is messagebox that not refrash !!!
MessageBox.Show("Dati Memorizzati", Text, MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
}
catch
{
MessageBox.Show("Errore in memorizzazione dati", Text,
MessageBoxButtons.OK, MessageBoxIcon.Error);
DwcSociLista.Focus();
return;
}

It happens only in a PC ... so I had yet changed HW and SW but the behavior
don't change.
 
I can't do this.
Because that stange behavior happens only on customer PC ... The same
application ,on my PC, works fine !!!
The application was builded in DEBUG Mode ... does it generate the problem ?

Thank you very much.
Stefano
 
Stefano said:
In a C# application I use a message box to display an error.
It is a library MessageBox.Show. It has a Okey button.
Sametimes button label and other label are displayed blank ???
In this case I change application (Alt+Tab) and when I came back messagebox is
correct displayed.

Thank you.

AFAIK some people complained about similar issue on this newsgroup few
times - and then the problem was caused by McAffe AntiVirus software.
Search news archive to find more specific info. HTH.

Best regards,
Michal Dabrowski
 
Stefano said:
Thank you !!!

PC have installed McAffe 8.0 !!!
Do you have any suggestions ?

Yes. Search in archive of this newsgroup - the problem was discussed
several times here and I think that you'll find the solution in the
archive (or at least some workaround I hope).

Best regards,
Michal Dabrowski
 
Back
Top