how to create a rectangle in a form in C#

Dec 8 2006 12:43 AM
Hello
My requirement is to create an editor for electronic drives where i have a matrix of 120/8.

I need to create rectangles for that.I wrote the following code,to create a rectangle but in o/p form nothing is to be seen.My code is

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace ZelioLadderEditor

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

public void RectangleInflateTest(PaintEventArgs e)

{

// Create a rectangle.

Rectangle rect = new Rectangle();

rect.X = 800;

rect.Y = 100;

rect.Width = 250;

rect.Height = 200;

Can any one of you tell me what is the error

Thanks In Advance
Poornima


Answers (1)