• Loading...
Atp UltimateEmailValidator
Creating a WinForms application
Send comments on this topic to ATP, Inc.
Getting Started > Creating a WinForms application

Glossary Item Box

This tutorial will walk you through creating a WinForms application and add EmailValidator control to it. It also shows how to:

  • Drag and Drop EmailValidator control from the Toolbox to your form.
  • Set EmailValidator properties.

Creating a new project and adding Email Validator control to it

  1. Start the Visual Studio .NET.
  2. From File menu, choose New, then choose Project.
  3. From the Project Creation dialog box, choose either Visual C# Projects or Visual Basic Projects then choose Windows Application. Specify a name and a location for the project, then click OK.
  4. Drag and drop the EmailValidator control from the Toolbox to the form.
    Win
    Another way is to add references to UltimateEmailValidator.dll, UltimateCommon.dll, and UltimateProxy.dll assemblies. Please see Installation instruction for C# and Installation instruction for VB.NET for more details.
  5. Now right click on the Email Validator component icon (bound with red rectangle in the picture above) to show the context menu, click on the Properties... menu.
    Win Win
  6. Now make a quick application to test. Drag a Button onto the form.
  7. Add the following code to the button "OnClick" event handler. This code is for uploading a local file to an Email Validator server.
    C# Copy Code
    // Create a new instance of the EmailValidator class.
    EmailValidator validator = new EmailValidator();
    // Validate the email.
    ValidationLevel result = validator.Validate("info@atp-inc.net");
    // Show result.
    MessageBox.Show(string.Format("Email address '{0}' has been validated at level {1}", "info@atp-inc.net", result.ToString()));
    VB.NET Copy Code
    ' Create a new instance of the EmailValidator class.
    Dim validator As New EmailValidator()
    ' Validate the email.
    Dim result As ValidationLevel = validator.Validate("info@atp-inc.net")
    ' Show result.
    MessageBox.Show(String.Format("Email address '{0}' has been validated at level {1}", "info@atp-inc.net", result.ToString()))
  8. Compile and execute the application by navigating to the Debug menu and choose Start. Click the button and you should see a message indicating that the email has been validated in the label control in the MessageBox.
ATP, Inc. is a Microsoft Partner. Our components are compatible with Windows 7 and optimized for Visual Studio