Control renderer Demo : Control : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Control »

 

Control renderer Demo









    

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

public class Form1 : Form
{

      public Form1() {
            InitializeComponent();
            
      }

    private void ControlRenderer_Paint(object sender, PaintEventArgs e)
    {
      
        CheckBoxRenderer.DrawCheckBox(e.Graphics, new Point(10,10),
          new Rectangle(10,10,110,15), "Style checkbox", Font,false, CheckBoxState.CheckedNormal);
      
    }
    private void InitializeComponent()
    {
      this.SuspendLayout();
      // 
      // ControlRenderer
      // 
      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
      this.ClientSize = new System.Drawing.Size(292, 266);
      this.Name = "ControlRenderer";
      this.Text = "ControlRenderer";
      this.Paint += new System.Windows.Forms.PaintEventHandler(this.ControlRenderer_Paint);
      this.ResumeLayout(false);

    }
      [STAThread]
      static void Main()
      {
        Application.EnableVisualStyles();
        Application.Run(new Form1());
      }

}



           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Control