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();
}
{
// 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
Sachin DoshiPosted Dec 8, 2006, 1:31 AM
public
void RectangleInflateTest(PaintEventArgs e){
Rectangle rect =
new Rectangle();rect.X = 40;
rect.Y = 40;
rect.Width = 150;
rect.Height = 200;
// Create a new pen.Pen blackPen =
new Pen(Brushes.Black); // Set the pen's width. //blackPen.Width = 1.0F; // Draw a rectangle.e.Graphics.DrawRectangle(blackPen, rect);
//Dispose of the pen.blackPen.Dispose();
}