VB 用sleep时,出现程序无响应
水流线画图如下: 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)是开始下一笔 怎么我一到下一划的时候就出错了,程序就不动了 大家帮我看看,哪里出问题了
不要sleep那句或改成application.doevents引用 不要sleep那句或改成application.doevents 不要sleep的话,无法控制速度 怎么用application.doevents? 奇怪的 Else Picture1.Line -(pen(temp1).PenPointx, pen(temp1).PenPo
相关问答:
VB偶学得不错,现在大一,高三的时候就学VB了,现在学校里都是学C#和VB.NET的兄弟多。。。 偶要转行VB.NET了~当年学VB学了2年,对VB里面的常用函数都十分了解。 Select、If结构、For Next循环、等都了解。。。 ......
vb将winsock控件封装到dll问题 有什么好的思路? 如果用Socket API呢? 例如,像下面这样封装Winsock控件,行的通? 创建ActiveX dll,添加窗体frmClient,加入WinSock控件wskClient。 类代码: Option Expli ......
Private Sub Check1_Click() If Check1.Value = 1 Then DTP1.Enabled = True Else DTP1.Enabled = False End If End Sub Private Sub Check2_Click() If Check2.Value = 1 Then DTP2.Enabled = True Else
......
在vb中怎么判断,插入到数据库中的值是重复的,本人才刚接触VB语言,甚是有好多地方还不懂,还请各位大侠们给出代码,谢谢了呀!!! 插入之前select一下阿。 或者写一个组合SQL插入语句,例如 IF not Exist( & ......
据说java语言是这样的,那VB呢? byte[] b(byte)0x62,(byte)0x11,(byte)0x72,(byte)0x31}; try { System.out.println(new String(b,"UTF-16")); } catch (UnsupportedEnco ......