using System.Drawing;
using System.Drawing.Drawing2D;

void drawforeground(int xx,int yy,int width,int height,int ____hatchstyle)
{
HatchStyle hs = (HatchStyle)____hatchstyle;//0-52까지 가능
Brush myBrush = new HatchBrush(hs, System.Drawing.Color.SteelBlue);
Pen myPen = new Pen(System.Drawing.Color.LightGray, 1);

System.Drawing.Graphics formGraphics;
formGraphics = this.CreateGraphics();
formGraphics.FillRectangle(myBrush, new Rectangle(xx, yy, width, height));
formGraphics.DrawRectangle(myPen , xx, yy, width, height);
}
void drawforeground(int xx,int yy,int width,int height,int ____hatchstyle)
{
HatchStyle hs = (HatchStyle)____hatchstyle;//0-52까지 가능
Brush myBrush = new HatchBrush(hs, System.Drawing.Color.LightYellow);
Pen myPen = new Pen(System.Drawing.Color.LightGray, 1);

System.Drawing.Graphics formGraphics;
formGraphics = this.CreateGraphics();
formGraphics.FillRectangle(myBrush, new Rectangle(xx, yy, width, height));
formGraphics.DrawRectangle(myPen , xx, yy, width, height);
}

ex31.cs
0.00MB
ex11.cs
0.02MB

 

+ Recent posts