VB 用sleep时,出现程序无响应

gaofuqi gaofuqi 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
水流线画图如下:
Picture1.CurrentX = pen(1).PenPointx Picture1.CurrentY = pen(1).PenPointy
For temp1 = 1 To pointcount - 1
If (pen(temp1).PenPointx = -1 And pen(temp1).PenPointy = -1) Then
Picture1.CurrentX = pen(temp1 + 1).PenPointx
Picture1.CurrentY = pen(temp1 + 1).PenPointy
Else
Picture1.Line -(pen(temp1).PenPointx, pen(temp1).PenPointy )
Sleep (pen(temp1 + 1).time - pen(temp1).time)
End If
Next temp1

pen的定义如下:
Private Type paintpen
PenPointx As Integer 'X轴坐标
PenPointy As Integer 'Y轴坐标
time As Long ‘时间点
End Type

(-1,-1,0)是开始下一笔
怎么我一到下一划的时候就出错了,程序就不动了
大家帮我看看,哪里出问题了
...全文
评论 4
收藏 已收藏
分享
返回顶部
gaofuqi
VB 16,718 成员 110,520 内容