- 分享
- 0
- 人气
- 7
- 主题
- 13
- 帖子
- 1837
- UID
- 76124
- 积分
- 2113
- 阅读权限
- 20
- 注册时间
- 2007-5-6
- 最后登录
- 2018-4-22
- 在线时间
- 1487 小时
|
- Private Sub Form1_paint(byval sender as object, byval e as system.windows.forms.paintEventArgs) handle MyBase.paint
- Dim g as Graphic = e.Graphic
- Dim P as Pen = New Pen(color.blue,5)
- g.DrawRectangle(P,120,120,150,150)
- g.Dispose()
- End sub
复制代码
把form1 的 MyBase.paint set 进去
Private Sub Form1_paint(byval sender as object, byval e as system.windows.forms.paintEventArgs) handle MyBase.paint
定义一个 Graphic
Dim g as Graphic = e.Graphic
定义一个 Pen 蓝色,5的粗线
Dim P as Pen = New Pen(color.blue,5)
g 的地方用p 的笔来画 第一个 xy 点 120 120 和到 第二个 xy 点 150 150
g.DrawRectangle(P,120,120,150,150)
释放 g
g.Dispose()
End sub
for .net
要引进
system.drawing.drawing2d
system.drawing.text
system.drawing
[ 本帖最后由 goodday 于 2008-7-6 12:48 PM 编辑 ] |
|