Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Create Popup Alert
 

Create Popup Alert

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
NBaig  Thursday, January 22, 2009 5:40 PM

Hi NBaig,

I want to know how does your main form designed. It related to the hang up. The way you show the popup window is correct. I think there may be something in your main form that result in the no response. Please show me some code of your main form and let us try to solve it.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, January 27, 2009 4:10 AM

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post editor window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, January 30, 2009 1:36 AM

You can use google to search for other answers

Custom Search

More Threads

• The variable 'BranchStyle' is either undelcared or was never assigned
• Problem in Short cut key in Windows application...
• how to keep ours form on top (in front) by using VB
• how to define a global parameter to use in all forms?
• How can I change the text of all controls in a form from chinese to english
• What's the mechanism for Tablelayoutpanel to expose its layout paroperties...
• How to implement a design-time complex property custom editor
• Is it possible to create a dynamic userControl?
• How to get the size of the design surface?
• Query Builder