class Program
{
string drawText;
protected override void OnPaint(NoName.Windows.Forms.PaintEventArgs pea)
{
NoName.Drawing.Graphics formGraphics = pea.Graphics;
NoName.Drawing.Font drawFont = new NoName.Drawing.Font("바탕체", DEPTH);
formGraphics.DrawString(drawText, drawFont, NoName.Drawing.Brushes.SteelBlue, 0, 0); //x,y position display
}
void draw()
{
int ii,kk;
drawText="";
for(ii=0; ii<MAPY-1; ii++)
{
for(kk=1; kk<MAPX-1; kk++)
{
if(tris[ii,kk]==1) drawText=drawText+"()";
else drawText=drawText+" ";
}
drawText=drawText+"\n";
}
Invalidate();
}
}
'c# 언어 > 초급과정' 카테고리의 다른 글
Form상속 (0) | 2022.03.17 |
---|---|
IntPtr 구조체 (0) | 2022.03.17 |
When Owner draw Control ,,,,,,,,,,,, (0) | 2022.02.22 |
SendMessage(form.Handle, WM_PAINT, IntPtr.Zero, IntPtr.Zero); (0) | 2022.02.17 |
BackgroundWorker 사용법 : Form 혹은 Console이 사라지면 함께 작동을 멈춘다. (0) | 2022.02.10 |