public SComboBox() { // SetStyle(ControlStyles.UserPaint, true); AutoSize = false; base.Size = new System.Drawing.Size(300, 35); Crtanja c = new Crtanja(this); Paint += c.ComboBoxPaint; Font = new Font("Arial", 11); }
/// <summary> /// Bojanje HELP gumba(label-a). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Help_Paint(object sender, PaintEventArgs e) { Crtanja c = new Crtanja(); GraphicsPath okvir = new GraphicsPath(); Rectangle trenutniOkvir = help.ClientRectangle; trenutniOkvir.Inflate(-1, -1); e.Graphics.DrawRectangle(new Pen(Color.FromArgb(14, 14, 14)), trenutniOkvir); trenutniOkvir.Inflate(2, 2); okvir = Crtanja.RoundedRect(trenutniOkvir, 5); // Iz pmocnih metoda. help.Region = new Region(okvir); }
public STextBox() { // SetStyle(ControlStyles.UserPaint, true); AutoSize = false; base.Size = new System.Drawing.Size(300, 35); base.BorderStyle = BorderStyle.None; Crtanja c = new Crtanja(this); Paint += c.TextBoxPaint; TextAlign = HorizontalAlignment.Left; Font = new Font("Arial", 11); }
public SButton() { base.BackColor = Color.FromArgb(41, 128, 185); base.FlatStyle = FlatStyle.Flat; base.ForeColor = Color.White; base.FlatAppearance.BorderSize = 0; base.Size = new Size(300, 35); base.Font = new Font("Arial", 11, FontStyle.Bold); Crtanja c = new Crtanja(this); Paint += c.ButtonPaint; MouseEnter += SButton_MouseEnter; MouseLeave += SButton_MouseLeave; }
public SForm() { this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); Font = new System.Drawing.Font("Arial", 10); Crtanja c = new Crtanja(this); FormBorderStyle = FormBorderStyle.None; Size = new System.Drawing.Size(1000, 700); StartPosition = FormStartPosition.CenterScreen; Paint += c.FormControlPaint; //Dodavanje Loga PictureBox logo = new PictureBox(); logo.Location = new System.Drawing.Point(10, 10); logo.Image = Resources.SwitchRLogo; logo.BackColor = System.Drawing.Color.Transparent; logo.Size = new System.Drawing.Size(100, 20); logo.SizeMode = PictureBoxSizeMode.StretchImage; this.Controls.Add(logo); // Dodvanje zatvaranja i minimiziranja Label exitApplication = new Label(); exitApplication.Name = "InputExitApplication"; exitApplication.Text = "X"; exitApplication.Location = new System.Drawing.Point((Width - 40), 10); exitApplication.ForeColor = System.Drawing.Color.FromArgb(200, 200, 200); exitApplication.Font = new System.Drawing.Font("Arial", 11, System.Drawing.FontStyle.Bold); exitApplication.BackColor = System.Drawing.Color.Transparent; exitApplication.Click += ExitApplication_Click; exitApplication.AutoSize = true; exitApplication.Size = new System.Drawing.Size(30, 30); exitApplication.Cursor = Cursors.Hand; this.Controls.Add(exitApplication); Label minApplication = new Label(); minApplication.Name = "InputMinApplication"; minApplication.Text = "_"; minApplication.Location = new System.Drawing.Point((Width - 60), 7); minApplication.ForeColor = System.Drawing.Color.FromArgb(200, 200, 200); minApplication.Font = new System.Drawing.Font("Arial", 11, System.Drawing.FontStyle.Bold); minApplication.Click += MinApplication_Click; minApplication.AutoSize = true; minApplication.Size = new System.Drawing.Size(30, 30); minApplication.BackColor = System.Drawing.Color.Transparent; minApplication.Cursor = Cursors.Hand; Controls.Add(minApplication); // Dodavanje Help-a help.Name = "InputHelp"; help.Text = "Help (F1)"; help.Location = new System.Drawing.Point((Width - 135), 7); help.ForeColor = System.Drawing.Color.FromArgb(14, 14, 14); // 34 help.Font = new System.Drawing.Font("Arial", 9); help.AutoSize = false; help.BackColor = System.Drawing.Color.Transparent; help.Size = new Size(65, 20); help.Padding = new Padding(5, 3, 0, 0); help.Paint += Help_Paint; help.Cursor = Cursors.Hand; help.Click += Help_Click; Controls.Add(help); // Klik na F1 }