How do you get a class to interact with the form to show a message box?
using System.Windows.Forms;
public class message
{
static void Main()
{
MessageBox.Show("Hello World!");
}
}
Try this:
System.Windows.Forms.MessageBox.Show("Here's a message!");
System.Windows.MessageBox.Show("Hello world"); //WPF
System.Windows.Forms.MessageBox.Show("Hello world"); //WinForms
using System.Windows.Forms;
...
MessageBox.Show("Hello World!");