public ShellSubMenuForm() { this.StartPosition = FormStartPosition.CenterParent; this.ShowInTaskbar = this.MaximizeBox = this.MinimizeBox = false; this.MinimumSize = this.Size = new Size(646, 369).DpiZoom(); this.Controls.AddRange(new Control[] { MlbSubItems, StatusBar }); StatusBar.CanMoveForm(); this.OnResize(null); }
public MyMainForm() { this.Text = Application.ProductName; this.MinimumSize = this.Size = new Size(866, 649).DpiZoom(); this.StartPosition = FormStartPosition.CenterScreen; this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); this.Controls.AddRange(new Control[] { MainBody, SideBar, StatusBar, ToolBar }); SideBar.Resize += (sender, e) => MainBody.Width = ClientSize.Width - SideBar.Width; ToolBar.CanMoveForm(); StatusBar.CanMoveForm(); }
public MyMainForm() { this.Text = Application.ProductName; this.MinimumSize = this.Size = new Size(866, 642).DpiZoom(); this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); this.Controls.AddRange(new Control[] { MainBody, SideBar, StatusBar, ToolBar }); SideBar.Resize += (sender, e) => this.OnResize(null); ToolBar.CanMoveForm(); StatusBar.CanMoveForm(); this.CenterToScreen(); }
public MyMainForm() { this.SuspendLayout(); this.Text = Application.ProductName; this.ForeColor = Color.FromArgb(80, 80, 80); this.BackColor = Color.FromArgb(250, 250, 250); this.StartPosition = FormStartPosition.CenterScreen; this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); this.Controls.AddRange(new Control[] { MainBody, SideBar, StatusBar, ToolBar }); SideBar.Resize += (sender, e) => this.OnResize(null); this.ClientSize = new Size(850, 610).DpiZoom(); this.MinimumSize = this.Size; MainBody.Dock = DockStyle.Left; StatusBar.CanMoveForm(); ToolBar.CanMoveForm(); this.ResumeLayout(); }