winform写出来的程序 不管用户怎么切换系统主题``程序始终保持windows经典样式的界面风格.这个怎么整?

解决方案 »

  1.   

    在Program.cs Main()里面有一个EnableVisualStyle()的方法,确保存在。
      

  2.   

    win7上面开发的winform程序,拿到xp上变得很难看,而且样式一改就变字体颜色。
      

  3.   

    很奇怪,楼主对 Windows 2000 的界面风格情有独钟?我觉得这个不重要吧。你让用户情何以堪?你的想法毕竟是少数,用户会拿到你开发的程序,会怎么想?他们会崩溃的。
      

  4.   


    使用自定义风格的话是不是跟上面那位大鸟说的一样把EnableVisualStyle()去掉?
    主要是窗体的标题栏那里还是会变。
      

  5.   

    我想让它使终跟Windows经典那样的样式 
      

  6.   


    在程序文件上点右键-属性-兼容性-关闭视……
     这样的话标题栏跟windows经典样式也不一样我想弄成跟windows经典样式那样的
      

  7.   


    其实主要是想更改一下标题的样式,我看了一下窗口代码如下:
            private System.Windows.Forms.Button btn_close;
            private System.Windows.Forms.Button btn_login;
            private System.Windows.Forms.Label lb_Name;
            private System.Windows.Forms.Label lb_Pwd;
            private System.Windows.Forms.Label lb_yuyan;
            private System.Windows.Forms.TextBox txt_User;
            private System.Windows.Forms.TextBox txt_Pwd;
            private System.Windows.Forms.ComboBox CB_Base;
            private System.Windows.Forms.Label label4;
            private System.Windows.Forms.Label label5;
            private System.Windows.Forms.Label label6;
            private System.Windows.Forms.Label label1;这些是初使窗体的一些控件,窗口代码生成后的一些属性就是this.XXX.Text="XXXX";
    这样的字样``并没有看到怎么设置标题的样式
    在Program.cs文件里看到了:        /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();//这一行指定是否按XX样式显示
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frm_Login());
            }
    请指点具体怎么弄一下呢,无标题窗体 自己画窗体有点麻烦啊 如果窗口多了都弄就比较复杂了求解