by Eric Zahler (2 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 3rd January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This is a cool screen saver you can play with the numbers and the colors Have fun!!
API Declarations
X As Double
Y As Double
z As Double
End Type
Const maxstar = 2000
Dim star(maxstar) As stars
Dim ostar(maxstar) As stars
Dim nstar(maxstar) As stars
Dim Speed
Dim nMouseCount As Integer
Private Type stars
X As Double
Y As Double
z As Double
End Type
Const maxstar = 2000
Dim star(maxstar) As stars
Dim ostar(maxstar) As stars
Dim nstar(maxstar) As stars
Dim Speed
Dim nMouseCount As Integer
*********************************************************************
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
nMouseCount = nMouseCount + 1
If nMouseCount > 5 Then End
End Sub
Private Sub Form_Load()
If App.PrevInstance Then End
Randomize
ScaleMode = 1
BackColor = vbGreen
ScaleWidth = 320
ScaleHeight = 300
Speed = 10
For i = 1 To maxstar
star(i).X = Rnd * ScaleWidth - 160
star(i).Y = Rnd * ScaleHeight - 200
star(i).z = i
Next
Timer1.Interval = 1
DoEvents
End Sub
Private Sub Timer1_Timer()
colour = vbRed
For f = 4 To maxstar
PSet (ostar(f).X, ostar(f).Y), 0
PSet (nstar(f).X, nstar(f).Y), colour
Next
'note
For e = 1 To maxstar
If star(e).z < 33 Then
star(e).z = maxstar
Else
star(e).z = star(e).z - Speed
End If
div_x = (256 * star(e).X) / star(e).z
div_y = (256 * star(e).Y) / star(e).z
ostar(e).X = nstar(e).X
ostar(e).Y = nstar(e).Y
nstar(e).X = div_x + 250
nstar(e).Y = div_y + 300
Next
End Sub
Private Sub CheckCommandLine()
Dim sCmdLine As String
sCmdLine = Trim$(LCase$(Command))
'note
If sCmdLine = "/s" Or sCmdLine = " " Then
Exit Sub
End If
'note
If sCmdLine = "/c" Then
MsgBox "Config Screen Not Available"
End
End If
'note
If Left$(sCmdLine, 50) = "/p" Then
End
End If
End Sub
No comments have been posted about This is a cool screen saver you can play with the numbers and the colors Have fun!!. Why not be the first to post a comment about This is a cool screen saver you can play with the numbers and the colors Have fun!!.