Bouncing Lines ScreenSaver
This is a really cool ScreenSaver, it looks like a bunch of lines following eachother and bouncing off the sides of your screen. It is a clone of the windows screensaver. You can change the speed and color of the lines. Enjoy
AI
Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Zdrojový kód
<p><b><u><font face="Verdana"><small><small><small><small><small><small><small>Bouncing Lines ScreenSaver</small></small></small></small></small></small></small></font><small><small><small><small><small><font face="Verdana"><small><small><br> </small></small></font></small></small></small></small></small></u><font face="Courier New"><small><small><small><small><small><font face="Verdana"><small><small>by Adam Lane</small></small><br> <br> </font></small></small></small></small></small> </font> </b><font face="Courier New"><font face="Verdana"><small><small><small><small><small><small><small>1) Create a </small></small></small></small></small></small></small></font> </font><font face="Verdana"><small><small><small><small><small><small><small>borderless </small></small></small></small></small></small></small></font><font face="Courier New"><small><small><small><small><small><small><small><font face="Verdana">form and a timer<br> 2) Form1 and Timer1<br> 3) Copy this code into your form</font></small></small></small></small></small></small></small><small><small><small><small><small><small><small><small><small><br> <br> </small></small></small></small>Dim x(4), Y(4), xSpeed(4), ySpeed(4), Trails As Integer<br> <br> Private Sub Form_Load()<br> Form1.WindowState = vbMaximized<br> Form1.BackColor = vbBlack<br> Form1.ForeColor = vbBlack<br> Form1.FillColor = vbBlack<br> Timer1.Interval = 1<br> For i = 0 To 3<br> x(i) = Form1.ScaleWidth \ 2<br> Y(i) = Form1.ScaleHeight \ 2<br> Next i<br> xSpeed(0) = -150: xSpeed(2) = -150<br> xSpeed(1) = 70: xSpeed(3) = 70<br> ySpeed(0) = -105: ySpeed(2) = -105<br> ySpeed(1) = 90: ySpeed(3) = 90<br> Trails = 50<br> End Sub<br> <br> Private Sub Timer1_Timer()<br> Dim z As Integer<br> If Trails > 0 Then<br> Trails = Trails - 1<br> z = 1<br> Else<br> z = 3<br> End If<br> For i = 0 To z<br> x(i) = x(i) + xSpeed(i)<br> Y(i) = Y(i) + ySpeed(i)<br> If x(i) < 0 Or x(i) > Form1.ScaleWidth Then xSpeed(i) = -xSpeed(i)<br> If Y(i) < 0 Or Y(i) > Form1.ScaleHeight Then ySpeed(i) = -ySpeed(i)<br> Next i<br> Line (x(0), Y(0))-(x(1), Y(1)), vbBlue<br> Line (x(2), Y(2))-(x(3), Y(3)), vbBlack<br> DoEvents<br> End Sub<br> </small></small></small></small></small> </font></p>
Původní komentáře (3)
Obnoveno z Wayback Machine