アプリケーションで、Windows.Forms
の水平分割線の色を変更したいStatusStrip
、またはこの線を非表示にしたい。何か案は?
これは私が言及しているものです:
ファイル: Program.cs
using System;
using System.Data;
using System.Drawing;
using System.Data.Linq;
using System.Windows.Forms;
namespace test {
class Program {
[STAThread]
static void Main() {
Application.Run(new FormMain());
}
}
}
ファイル: FormMain.cs
using System;
using System.Data;
using System.Drawing;
using System.Data.Linq;
using System.Windows.Forms;
namespace test {
class Vars {
public class Colors {
public static Color BackRed = Color.FromArgb(040, 000, 000);
public static Color ForeRed = Color.FromArgb(240, 120, 120);
public static Color BackGrn = Color.FromArgb(000, 040, 000);
public static Color ForeGrn = Color.FromArgb(120, 240, 120);
public static Color BackBlu = Color.FromArgb(000, 000, 040);
public static Color ForeBlu = Color.FromArgb(120, 120, 240);
}
}
class FormMain : Form {
MenuStrip menuStrip = new MenuStrip();
StatusStrip statusStrip = new StatusStrip();
public FormMain() {
this.FormMain_Setup();
}
private void FormMain_Setup() {
this.Top = 20;
this.Left = 20;
this.Width = 1200;
this.Height = 675;
this.BackColor = Vars.Colors.BackBlu;
this.ForeColor = Vars.Colors.ForeBlu;
this.MaximizeBox = false;
this.StartPosition = FormStartPosition.Manual;
this.FormBorderStyle = FormBorderStyle.Fixed3D;
this.KeyDown += FormMain_KeyDown;
this.FormMain_MenuStrip_Setup();
this.FormMain_StatusStrip_Setup();
}
private void FormMain_StatusStrip_Setup() {
this.statusStrip.Height = 30;
this.statusStrip.AutoSize = false;
this.statusStrip.BackColor = Vars.Colors.BackRed;
this.statusStrip.ForeColor = Vars.Colors.ForeRed;
this.statusStrip.SizingGrip = false;
this.Controls.Add(statusStrip);
}
private void FormMain_MenuStrip_Setup() {
this.menuStrip.Height = 30;
this.menuStrip.AutoSize = false;
this.menuStrip.BackColor = Vars.Colors.ForeGrn;
this.menuStrip.ForeColor = Vars.Colors.BackGrn;
this.Controls.Add(menuStrip);
}
private void FormMain_KeyDown(object sender, KeyEventArgs e) {
this.FormMain_Exit();
}
private void FormMain_Exit() {
this.Close();
}
}
}