我在选项菜单中有按钮,我希望能够一次更改每个表单的样式。目前它只适用于选项菜单本身,因为我使用了“this”。
private void Fullscreen_toggle_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Normal;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Bounds = Screen.PrimaryScreen.Bounds;
}
private void Windowed_toggle_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
}
有没有办法让它在全球范围内应用?