Я разрабатываю приложение winform с использованием C# 4.0
У меня есть форма с одной кнопкой. Я изменил цвет кнопки BackColor на желтый. Во время выполнения цвет задней части кнопки слегка меняется, когда я навожу на нее указатель мыши. Я хочу отключить это. Я хочу, чтобы цвет оставался неизменным, что бы ни случилось.
Я разрабатываю приложение winform с использованием C# 4.0
У меня есть форма с одной кнопкой. Я изменил цвет кнопки BackColor на желтый. Во время выполнения цвет задней части кнопки слегка меняется, когда я навожу на нее указатель мыши. Я хочу отключить это. Я хочу, чтобы цвет оставался неизменным, что бы ни случилось.
Вот код формы:
[code]using System; using System.Windows.Forms;
namespace Something { public partial class Home : Form { public Home() { InitializeComponent(); }
} }
namespace Something { partial class Home { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null;
/// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); }
#region Windows Form Designer generated code
/// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Home)); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.BackColor = System.Drawing.Color.Yellow; resources.ApplyResources(this.button1, "button1"); this.button1.Name = "button1"; this.button1.UseVisualStyleBackColor = false; // // Home // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(227)))), ((int)(((byte)(228))))); this.Controls.Add(this.button1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Home"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.Home_Load); this.ResumeLayout(false);