I am drawing a line from point A to B. I want it to take about 1 second to complete. I also want to have the line draw at run time and appear to draw over that 1 second from A to B. I am doing it with a for loop and running a variable up to a very high count. This isnt an effiecent way of doing it. Here is my code:
Any help would be great.Code:Private Sub cmdClientMenu_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If cmdFind.Visible = True Then Exit Sub End If lineMC.Visible = True lineMC.X1 = 2520 lineMC.Y1 = 2880 MyXPos = lineMC.X1 MyYPos = lineMC.Y1 For i = 0 To 110000 If i = 10000 Or i = 20000 Or i = 30000 Or i = 40000 Or i = 50000 Or i = 60000 _ Or i = 70000 Or i = 80000 Or i = 90000 Or i = 100000 Or i = 110000 Then frmSalon.lineMC.X2 = MyXPos + 120 frmSalon.lineMC.Y2 = MyYPos - 120 frmSalon.Refresh MyXPos = frmSalon.lineMC.X2 MyYPos = frmSalon.lineMC.Y2 End If Next frmSalon.cmdFind.Visible = True End Sub![]()




Reply With Quote