|
Hi There,
I have a windows application which keep track of components' status on
different server. Basically it displays the name of the components,
their status (UP/DOWN) and on which machine they are running.
I created a separate form (with a label displaying message) to display
the alert when component's status changed from its current status.
namespace CommandCenter
{
public partial class AlertForm : Form
{
public AlertForm(string componentname, string status)
{
InitializeComponent();
label1.Text = componentname + " IS " + status;
}
}
}
Here is the code where I create pop-up alert:
if (newstatus != oldstatus)
{
new AlertForm(componentname, newstauts).Show();
//MessageBox.Show(message, componentname + "'s Alert" , MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
The issue is :
When status gets changes I can see Alert form pops up, but it doesn't
respond and also doesn't show the label. I have to terminate the
application. But when I use MessageBox it works fine, but I dont want
to use it b/c it stops the application until you click on 'OK'.
Let me know what can be the issue.
Thanks
NBaig
- Changed TypeKira QianMSFT, ModeratorFriday, January 30, 2009 1:36 AM
-
|