Private Sub Timer1_Timer()
FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
FillStyle = 0
Circle (Rnd * Width, Rnd * Height), Rnd * Width, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
Private Sub Form_Load()
Timer1.Interval = 100
If App.PrevInstance Then
Unload Me
End If
End Sub
Option Explicit Private Const SPI_SCREENSAVERRUNNING = 97
'''Api tanımı
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long Private Sub Form_Load() Timer1.Interval = 100 If App.PrevInstance Then Unload Me End If
SystemParametersInfo SPI_SCREENSAVERRUNNING, 1, ByVal 1&, False End SubPrivate Sub Form_Unload(Cancel As Integer)
Ekran koruyucunun bitişini bildir
SystemParametersInfo SPI_SCREENSAVERRUNNING, 0, ByVal 1&, False End Sub