http://i21.photobucket.com/albums/b2...ardy/error.jpg
How do I solve it?
Printable View
http://i21.photobucket.com/albums/b2...ardy/error.jpg
How do I solve it?
I'm not sure how that could happen unless you have specifically removed the STAThread attribute from your Main method. This is what your Program.cs file should look like by default:give or take a 'using' directive.Code:using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
Thanks
Actually it is this wizard project
http://www.vbforums.com/showthread.php?t=574281
The original source has no Program.cs.
By the way, does STA mean that I cannot create multiple threads in the application?