- 积分
- 1
- 注册时间
- 2002-12-27
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2005-11-8 01:35:26
|
显示全部楼层
来自 同济大学
Re:在vb里怎么画出实三角形?
使用API函数绘制吧。示例代码如下,相关的函数和类型声明可以在APIViewer里面找到。
Dim Points() As POINTAPI,NCount As Integer
Dim FillMode As Long
Dim hBrush As Long, hOldBrush As Long
Dim OldFillMode As Long
hBrush = CreateSolidBrush(RGB(255, 255, 0))
hOldBrush = SelectObject(Me.hDC, hBrush)
OldFillMode = SetPolyFillMode(Me.hDC, FillMode)
Polygon Me.hDC, Points(0), NCount
SetPolyFillMode Me.hDC, OldFillMode
SelectObject Me.hDC, hOldBrush
DeleteObject hOldBrush |
|