방법: 도형 폼 만들기(Visual C#)
업데이트: 2007년 11월
다음 예제에서는 폼을 타원으로 만듭니다.
예제
System.Drawing.Drawing2D.GraphicsPath shape =
new System.Drawing.Drawing2D.GraphicsPath();
shape.AddEllipse(0, 0, this.Width, this.Height);
this.Region = new System.Drawing.Region(shape);
코드 컴파일
이 코드를 사용하려면 Form1_Load 이벤트 처리기에 코드를 복사합니다.
Form 클래스의 Region 속성은 고급 멤버입니다.