EFileTahi-A Posted October 11, 2006 Posted October 11, 2006 Hello folks, It's been a while since I last posted here... I would love to know how can I startup my .NET v2.0 project with a class instead of a form. I could do this in v1.1 but I don't know how to do this in 2.0. Thank you :) Quote
Gill Bates Posted October 11, 2006 Posted October 11, 2006 You should have a Program.cs file that looks something like:static class Program { /// <summary> /// The main entry point for the application. /// </summary> [sTAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain()); } }Instead of calling Application.Run you can just create a new instance of your class. Quote
EFileTahi-A Posted October 11, 2006 Author Posted October 11, 2006 Yeah, I do have the program.cs file. I see what u mean :) Than you! - THREAD CLOSED - Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.