谁有VB或VC的绘图源程序?

rox 2001-09-04 12:13:32
VB或VC的绘图程序,要求类似于Windows中的画图。能够画直线、园、长方形,能够填充,有工具框。谢了!
...全文
75 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
rox 2001-09-04
  • 打赏
  • 举报
回复
谢了!我去先
ozw 2001-09-04
  • 打赏
  • 举报
回复
http://www.planet-source-code.com/

多的是,自己去找吧
lanren_me 2001-09-04
  • 打赏
  • 举报
回复
呵呵,我很大方:
Private Sub 特技_Click(index As Integer)
Timer7.Enabled = False
Select Case index
Case 0 '推出
X = W / 2: Y = H / 2
Timer0.Enabled = True
Case 1 '拉近
X = 0: Y = 0
Timer1.Enabled = True
Case 2 '推拉
X = W / 2: Y = H / 2
Timer2.Enabled = True
Case 3 '百叶窗
X = 0: Y = 0
Timer3.Enabled = True
Case 4 '马赛克
Timer4.Enabled = True
Case 5 '拉幕
X = 0: Y = 0
Timer5.Enabled = True
Case 6 '滚动
X = 0
Timer6.Enabled = True
End Select


End Sub
Private Sub Stopped() '停止所有定时器
Timer0.Enabled = False
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
Timer5.Enabled = False
Timer6.Enabled = False
End Sub



Private Sub Timer0_Timer() '推出
On Error Resume Next
X = X - W / 100: Y = Y - H / 100
If X <= 0 Or Y <= 0 Then
Stopped
Timer7.Enabled = True
End If
p1.PaintPicture p2.Picture, 0, 0, W, H, X, Y, W - 2 * X, H - 2 * Y
End Sub

Private Sub Timer1_Timer() '拉近
On Error Resume Next
p1.PaintPicture p2.Picture, 0, 0, W, H, X, Y, W - 2 * X, H - 2 * Y
X = X + W / 100: Y = Y + H / 100 '初值为0
If X >= W / 2 Or Y >= H / 2 Then
Stopped
Timer7.Enabled = True
End If
End Sub

Private Sub Timer2_Timer() '推拉
On Error Resume Next
If Back Then
X = X + W / 100: Y = Y + H / 100
If X >= W / 2 Or Y >= H / 2 Then Back = Not Back
Else
'X = X - W / 100: Y = Y - H / 100
'If X <= 0 Or Y <= 0 Then
'Back = Not Back: X = 0: Y = 0
'End If
Stopped
Timer7.Enabled = True
End If
p1.PaintPicture p2.Picture, 0, 0, W, H, X, Y, W - 2 * X, H - 2 * Y
End Sub

Private Sub Timer3_Timer() '百叶窗
On Error Resume Next
Dim i1 As Integer, j1 As Integer, m1 As Integer, n1 As Integer
m1 = W / 20: n1 = H / 20
X = X + W / 400: Y = Y + H / 400 '初值为0
If X >= m1 And Y >= n1 Then
Stopped
Timer7.Enabled = True
'Exit Sub
End If
For i1 = 0 To 18
For j1 = 0 To 18
p1.PaintPicture p2.Picture, i1 * m1, j1 * n1, , , i1 * m1, j1 * n1, X, Y
Next j1, i1
End Sub

Private Sub Timer4_Timer() '马赛克
On Error Resume Next
Dim i As Integer, m As Integer, n As Integer, xx As Integer, yy As Integer
Static c As Integer
c = c + 1
If c > 100 Then
p1.PaintPicture p2.Picture, 0, 0: c = 0
Stopped
Timer7.Enabled = True
End If
m = W / 100: n = H / 100
For i = 1 To 50 + c * 10
xx = Rnd * (W - m - 50)
yy = Rnd * (H - n - 50)
p1.PaintPicture p2.Picture, xx, yy, , , xx, yy, m, n
Next i


End Sub

Private Sub Timer5_Timer() '拉幕
On Error Resume Next
X = X + W / 100: Y = Y + H / 100 '初值为0
p1.PaintPicture p2.Picture, W / 2 - X, 0, , , W / 2 - X, 0, 2 * X, H
If X > 0.51 * W Then
Timer5.Enabled = False
Timer7.Enabled = True
End If
End Sub

Private Sub Timer6_Timer() '滚动
On Error Resume Next
X = X + W / 200 '初值为0
If X >= W Then
Stopped
Timer7.Enabled = True
End If
p1.PaintPicture p2.Picture, W - X, 0, , , 0, 0, X, H
End Sub

Private Sub Timer7_Timer()
If nd > 6 Then nd = 0
p1.Picture = LoadPicture("")
特技_Click (nd)
nd = nd + 1
End Sub

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧