I seem to be able to pass the parameter to the form from the program, but then how do i access the variable in the buttons routines. I have put the two sub routines Main() and Start up which would run the form1. and then I have put the namespace of the form.
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
StartUp();
}
static void StartUp()
{
bool mode = false;
Application.Run(new Form1());
//bool playermode = GetPlayerMode();
}
namespace PencilProject
{
public partial class Form1 : Form
{
private static bool modebool;
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
modebool = true;
Close();
}
private void button2_Click(object sender, EventArgs e)
{
modebool = false;
Close();
}
}
}