I'm trying to create a screen saver, where a line flys on the screen!
I have tried the following code, but after a few loops, the edges of the line disapear outside the screen, and so does the line after some time.....
Does anyone know how to make a line fly INSIDE the screen??
Code:Form1.Show Dim Scr For Scr = 1 To 1 Do Line1.x1 = Line1.x1 + 34 Line1.x2 = Line1.x2 - 45 Line1.y1 = Line1.y1 + 24 Line1.y2 = Line1.y2 + 15 pausetime = 0.5 start = Timer Do While Timer < start + pausetime DoEvents Loop Line1.x1 = Line1.x1 - 30 Line1.x2 = Line1.x2 - 80 Line1.y1 = Line1.y1 + 20 Line1.y2 = Line1.y2 - 15 pausetime = 0.5 start = Timer Do While Timer < start + pausetime DoEvents Loop Line1.x1 = Line1.x1 + 300 Line1.x2 = Line1.x2 - 80 Line1.y1 = Line1.y1 - 20 Line1.y2 = Line1.y2 + 150 start = Timer Do While Timer < start + pausetime DoEvents Loop Line1.x1 = 4320 Line1.x2 = 4320 Line1.y1 = 2040 Line1.y2 = 3720 Loop Next Scr


Reply With Quote