Saturday, October 4, 2014

Drawing Graphics on a Windows Form

10:21 AM - By azeheruddin khan 0

This example draws a circle on a form.

using System;
using System.Windows.Forms;

namespace DrawingGraphics
    public partial class HomeForm : Form
        public HomeForm()

        private void HomeForm_Load(object sender, EventArgs e)
            HomeForm_Paint(null, null);

        private void HomeForm_Paint(object sender, PaintEventArgs e)
            System.Drawing.Graphics graphics = this.CreateGraphics();
            System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(0, 0, 200, 200);
            graphics.DrawEllipse(System.Drawing.Pens.Black, rectangle);            

About the Author

I am Azeheruddin Khan having more than 6 year experience in c#, and ms sql.My work comprise of medium and enterprise level projects using and other Microsoft .net technologies. Please feel free to contact me for any queries via posting comments on my blog,i will try to reply as early as possible. Follow me @fresher2programmer
View all posts by admin →

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post



© 2014 Fresher2Programmer. WP Theme-junkie converted by Bloggertheme9
Powered by Blogger.
back to top