private void InitializeComponent() { minimizeButton = new RoyalButton(); maximizeButton = new RoyalButton(); closeButton = new RoyalButton(); SuspendLayout(); // // minimizeButton // minimizeButton.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right))); minimizeButton.BackColor = BackColor; minimizeButton.BorderColor = Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); minimizeButton.BorderThickness = 3; minimizeButton.DrawBorder = false; minimizeButton.HotTrackColor = Color.Gainsboro; minimizeButton.Image = Properties.Resources.Minimize; minimizeButton.LayoutFlags = RoyalLayoutFlags.ImageOnly; minimizeButton.Location = new Point(900, 1); minimizeButton.Margin = new Padding(1); minimizeButton.Name = "minimizeButton"; minimizeButton.PressedColor = Color.CornflowerBlue; minimizeButton.PressedForeColor = Color.White; minimizeButton.Size = new Size(33, 30); minimizeButton.TabIndex = 2; minimizeButton.Text = "minimizeButton"; minimizeButton.Click += new EventHandler(MinimizeButton_Click); // // maximizeButton // maximizeButton.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right))); maximizeButton.BackColor = BackColor; maximizeButton.BorderColor = Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); maximizeButton.BorderThickness = 3; maximizeButton.DrawBorder = false; maximizeButton.HotTrackColor = Color.Gainsboro; maximizeButton.Image = Properties.Resources.Maximize; maximizeButton.LayoutFlags = RoyalLayoutFlags.ImageOnly; maximizeButton.Location = new Point(935, 1); maximizeButton.Margin = new Padding(1); maximizeButton.Name = "maximizeButton"; maximizeButton.PressedColor = Color.CornflowerBlue; maximizeButton.PressedForeColor = Color.White; maximizeButton.Size = new Size(33, 30); maximizeButton.TabIndex = 1; maximizeButton.Text = "maximizeButton"; maximizeButton.Click += new EventHandler(MaximizeButton_Click); // // closeButton // closeButton.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right))); closeButton.BackColor = BackColor; closeButton.BorderColor = Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); closeButton.BorderThickness = 3; closeButton.DrawBorder = false; closeButton.HotTrackColor = Color.Gainsboro; closeButton.Image = Properties.Resources.Close; closeButton.LayoutFlags = RoyalLayoutFlags.ImageOnly; closeButton.Location = new Point(970, 1); closeButton.Margin = new Padding(1); closeButton.Name = "closeButton"; closeButton.PressedColor = Color.Crimson; maximizeButton.PressedForeColor = Color.White; closeButton.Size = new Size(33, 30); closeButton.TabIndex = 0; closeButton.Text = "closeButton"; closeButton.Click += new EventHandler(CloseButton_Click); // // RoyalForm // FormBorderStyle = FormBorderStyle.None; BackColor = Color.WhiteSmoke; ClientSize = new Size(512, 512); Controls.Add(minimizeButton); Controls.Add(maximizeButton); Controls.Add(closeButton); Name = "RoyalForm"; Text = "RoyalForm"; ResumeLayout(false); }