I am trying to develop a program that will not show untill a boolian is set to false , but I am having trouble making the code work. Here is the code I am using to start the program;

#include "stdafx.h"
#include "Form1.h"

using namespace Program;

int main(array<System::String ^> ^args)
	// Enabling Windows XP visual effects before any controls are created

	// Create the main window and run it
		if(screen = false)
			Application::Run(gcnew Form1());
		if(screen = true)
	return 0;

When I try and run this, I get the following error;

1>.\Program.cpp(24) : error C2665: 'System::Windows::Forms::Application::Exit' : none of the 2 overloads could convert all the argument types
1>        c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll: could be 'void System::Windows::Forms::Application::Exit(System::ComponentModel::CancelEventArgs ^)'
1>        while trying to match the argument list '(Program::Form1)'

All of the variables have allready been defined in a different part of the program

Change the first if statement to if(screen == false) or if(!screen) and for the second one if(screen == true) or if(screen) .