各位高手,我开发的是C#智能设备应用程序,出现如下错误:
错误 1 “System.Windows.Forms.Application”并不包含“EnableVisualStyles”的定义
错误 2 “System.Windows.Forms.Application”并不包含“SetCompatibleTextRenderingDefault”的定义
源代码如下:
using System.Collections.Generic;
using System.Windows.Forms;
using System.Collections;namespace shiyan2
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [MTAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new gobangBoardGroupBox());
        }
    }
}

解决方案 »

  1.   

    只要你gobangBoardGroupBox是你个窗体的name,那么你上面的代码就没有问题
    你新建一个Windowns窗体应用程序,会自动给你生成上面的代码
      

  2.   

    Application.Run(new gobangBoardGroupBox());这个的问题,你吧他修改了就好了
      

  3.   


    叫你新建一个Windowns窗体应用程序,并将From1的name改为gobangBoardGroupBox会自动给你生成上面的代码,你贴出来的代码没问题,是其他问题,这个程序和新建的程序比较一下不就知道错那了。
      

  4.   

    我之前是这样操作的,只是后来我添加了这两句:
    Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);