How to use your own MessageBox control in another Windows Forms application

suggest change

To find the existing .cs files, right-click the project in Visual Studio and choose Open Folder in File Explorer.

  1. In Solution Explorer, right-click the Windows Forms project, choose Add > Existing Item, and select the control's .cs file.

  2. Import the control's namespace so the form file can name the control.

    using System;
       using System.Collections.Generic;
       using System.ComponentModel;
       using System.Data;
       using System.Drawing;
       .
       .
       .
       using CustomMsgBox; //Here's the using statement for our dependency.
    
  3. To display the message box, call the control's public method. This page does not show that call.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents