Programing/C#

[C#]Draw관련

흰군 2013. 1. 16. 16:50

C#에서 Paint 이벤트에서 Draw를 할려면 

e.Graphics.DrawXXX 일런 식으로 가능하지만


Paint 이벤트 왜에서 Draw하려면

Graphics G = pictureBox1.CreateGraphics();

G.DrawXXX

이렇게 하면 pictureBox1에 Draw된다.


pen 선언은 이렇게

Pen pen = new Pen(Color.Black);