7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
startleft = mainform.Left
endleft = Screen.Width
starttime = GetTickCount
'nowtemp = GetTickCount
nowtemp = 0
Do While (nowtemp <= 700)
'sleep 10
nowtemp = GetTickCount - starttime
If (nowtemp < 700) Then
steplength = nowtemp * (endleft - startleft) / 700
mainform.Left = startleft + steplength
Else
mainform.Left = endleft
End If
DoEvents
Loop
starttime = GetTickCount
'nowtemp = GetTickCount
nowtemp = 0
Do While (nowtemp <= 800)
'sleep 10
nowtemp = GetTickCount - starttime
If (nowtemp < 800) Then
steplength = nowtemp * (endleft - startleft) / 800
mainform.Left = endleft - steplength
Else
mainform.Left = startleft
enidf
DoEvents
Loop
End Sub