using System.Runtime.InteropServices;
namespace WinFormsApp1
{
public partial class Form1 : Form
{
[DllImport("user32.dll")]
public static extern int MessageBox(IntPtr h, string m, string c, int type);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int rv = MessageBox(IntPtr.Zero, "Message Text", "Title", 0);
}
}
}
/*
* run:
*
*
*
*/