WinForms Desktop Alert Control
Add popup Window for notification to users to Windows Forms application
Desktop Alert Control for WinForms Overview
The Windows Forms Desktop Alert component is used to display a popup window and give a notification to users that a particular event occurred. It is really easy to integrate the Desktop Alert control into Windows Forms applications and customize the Desktop Alert control for Windows Forms by using the C# API of the Desktop Alert control. This cool control can be easily dragged and dropped from the Microsoft VS toolbox. The Desktop Alert control for Windows Forms can be used in various monitor environments. The property of Desktop Alert Manager helps developers to manage the places of the Desktop Alert instances.
How to Add the Desktop Alert Control to Windows Foms
- To add the Desktop Alert to Windows Forms, we need to create a Window Form project first
- Open the default form designer in your Windows Forms template project
- Open the Toolbox, access the KetticDeskTopAlert Control, drag and drop the control to the Forms
- Create a new Windows Forms application in Visual Studio and open the designer of the default form.
- Then, the Control will be displayed on the Form designer and developers can customize it as necessary through the grid property of Visual Studio.
- To add an alert window to the form, add a button to the form and create a handler for the button Click event. Copy and paste the following C# code snippet to the event handler,
void button1_Click(object sender, EventArgs e)
{
this.desktopAlert1.CaptionText = "A New Message";
this.desktopAlert1.ContentText = "Hello, how are you today";
this.desktopAlert1.Display();
}
The Windows Forms Desktop Alert component allows the desktop alert appearing for five seconds by default. If developers do not want to customize the displaying time of desktop alert, they can change the value of the property named AutoClose as AutoClosePostpone.