Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class does not have a suitable Main method

Status
Not open for further replies.

Hokkie

MIS
Nov 21, 2001
77
NL
Hi,

My Windows application has a startup object defined in the properties of its project. This startup object has a public constructor that has a simple singleton implementation. The application has been running fine for almost a year.

Right now I'm in the middle of changing database-access from MS Access to MySql, and for some reason when I try to build the solution, VS2003 gives me this error:

'xxxxx.Applicatie' does not have a suitable Main method'

Well, the startup object doesn't have a Main method, but it never had one!

Here is the constructor for the startup object:

Code:
public Applicatie()
{
	if (deApplicatie==null)
	{	
		Thread th = new Thread(new ThreadStart(DoSplash));
		th.Start();
				
		deApplicatie = this;

		if (LogonSuccesvol()==true)
		{
			th.Abort();
			System.Windows.Forms.Application.Run(new FormHoofdscherm());
		}
		else
		{
			if (frmLogon.Cancel==false)
			{
				System.Windows.Forms.MessageBox.Show("some message.", "Hoorspelacteurs");
			}
			frmLogon.Close();
			th.Abort();
		}
	}
	else
	{
		System.Windows.Forms.MessageBox.Show("some message", "Hoorspelacteurs");
	}
}

Can anybody see what is wrong with this?

TIA,

Hokke


 
Uhm... never mind. Went a little overboard with commenting out old code, including a Main method in my startup project. (-:

Thanks for your time, anyway.


Hokke



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top