Getting Started with Windows Forms MessageBox (MessageBoxAdv)
17 Nov 20211 minute to read
This section explains how to configure MessageBoxAdv control in a Windows Forms application.
Assembly deployment
Refer control dependencies section to get the list of assemblies or NuGet package needs to be added as reference to use the control in any application.
Please find more details regarding how to install the nuget packages in windows form application in the below link:
Creating simple application with MessageBoxAdv
You can create the Windows Forms application with MessageBoxAdv as follows:
Creating the project
Create a new Windows Forms project in the Visual Studio to display the MessageBoxAdv.
Configure MessageBoxAdv
To add control manually in C#, follow the given steps:
Step1: Add the following required assembly references to the project:
- Syncfusion.Shared.Base.dll
Step2: Include the namespaces Syncfusion.Windows.Forms.
using Syncfusion.Windows.Forms;
Imports Syncfusion.Windows.Forms
Step3: Displays the MessageBoxAdv
by using MessageBoxAdv.Show function.
// Display the MessageBox using [Show](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html#Syncfusion_Windows_Forms_MessageBoxAdv_Show_System_String_) function.
MessageBoxAdv.MessageBoxStyle = MessageBoxAdv.Style.Metro;
MessageBoxAdv.Show(this,"Save changes?", "File Modified", MessageBoxButtons.YesNo,MessageBoxIcon.Question);
' Display the MessageBox using [Show](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html#Syncfusion_Windows_Forms_MessageBoxAdv_Show_System_String_) function.
MessageBoxAdv.MessageBoxStyle = MessageBoxAdv.Style.Metro
MessageBoxAdv.Show(this,"Save changes?", "File Modified", MessageBoxButtons.YesNo,MessageBoxIcon.Question)