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);
}
'c# 언어 > 중급과정' 카테고리의 다른 글
SendMessage/FindWindow/Snd/Rcv Str (0) | 2022.03.15 |
---|---|
Form 상속받아, HatchStyle 확인하기 (0) | 2022.03.10 |
Hexa 4가지 항목으로 점수계산 로직 (0) | 2022.03.06 |
LINQ 쿼리 소개(C#) (0) | 2022.02.23 |
Tris & Background Process Combination (0) | 2022.02.15 |