I'm programmin a screen saver....but!!!!
I have the following code in a timer to draw a circle, but every time the circle is drawed
and the timer starts to draw a new circle, it starts a new "copy" of the screen saver!!
This only happens when I test it from the Display settings, not from VB!! What is wrong??
Code:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) End End Sub Private Sub Form_Load() Timer1.Interval = 1 End Sub Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) End End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Static Count As Integer If Count > 3 Then End Else Count = Count + 1 End If End Sub Private Sub Timer1_Timer() Dim CX, CY, Radius, Limit ' Declare variable. ScaleMode = 3 ' Set scale to pixels. CX = ScaleWidth / 2 ' Set X position. CY = ScaleHeight / 2 ' Set Y position. If CX > CY Then Limit = CY Else Limit = CX For Radius = 0 To Limit ' Set radius. Circle (CX, CY), Radius, RGB(Rnd * 205, Rnd * 70, Rnd * 255) Next Radius End Sub




Reply With Quote