using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace System_Graphics{ public partial class Form1 : Form { public Graphics g; public Form1() { InitializeComponent(); } private static int lightstate = 0; private void button1_Click(object sender, EventArgs e) { using (Graphics g = this.CreateGraphics()) { String password = "password"; if ((txtPassword.Text == password)) { g.FillEllipse(Brushes.DarkGray, new Rectangle(105, 105, 105, 105)); g.FillEllipse(Brushes.Silver, new Rectangle(100, 100, 100, 100)); lblLightOn.Visible = true; tmrTimer_Tick(sender, e); } else { MessageBox.Show("Incorrect Password"); } } }}