Visual Basic 中学校 > Visual Basic サンプル集 > Visual Basic サンプル集目次 >
VB.NET 2002, VB.NET 2003, VB2005
フォームを変形させる
1.フォームを楕円形にする例
Dim myGPath As New Drawing2D.GraphicsPath myGPath.AddEllipse(New RectangleF(100, 100, 400, 200))
Me.Region = New Region(myGPath)
2.フォームを文字の形にする例
以下の例ではフォームを★の形にする
Dim myGPath As New Drawing2D.GraphicsPath myGPath.AddString("★", FontFamily.GenericSansSerif, CInt(FontStyle.Regular), 200, New PointF(100, 100), StringFormat.GenericDefault)
Me.Region = New Region(myGPath)