By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,896 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,896 IT Pros & Developers. It's quick & easy.

Trying to imitate VS2005...

P: n/a
In Visual Studio 2005 Windows Applications there is always a class named
program that incorporates the following code:
/// <summary>

/// The main entry point for the application.

/// </summary>


static void Main()



Application.SetCompatibleTextRenderingDefault(fals e);

Application.Run(new StepByStep3_01());


I was trying to imitate this pattern using Visual Studio 2003. Recognizing
that not all the methods of .NET 2.0 may be available in .NET 1.1, I removed
the first two Application methods, and only tried using the Application.Run
method that I know exists in 1.1.

I made sure I had using statements for those namespaces that exist in 1.1
that correlate with those from the sampe in 2.0. I main the class program
in files program.cs the default startup, but when I attempted to compile,
the system had issues with the [STAThread] attribute. It did not
recognize it as an attribute and would not compile.

I am wondering what I missed, if anything. It seems to me that using a
program class with a main method is a good idea, but if I can't open a form
that way I will have go back to the standard method. Can anyone tell me
what I could be doing wrong?
Sep 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.