by Thangaraja B.E (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 10th December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Screen saver application
API Declarations
Dim draw As Boolean
'form1.clipcontrols=false
'form1.controlbox=false
'form1.borderstyle=0
Timer1.Enabled = True
Call sizeme
Command1.Visible = False
End Sub
Private Sub form_load()
Command1.Caption = "Show Screen Saver"
Timer1.Interval = 100
Timer1.Enabled = False
End Sub
Private Sub sizeme()
Width = 0
Height = Screen.Height
Left = 0
Top = 0
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
draw = True
oldx = X
oldy = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If draw Then
Line (oldx, oldy)-(X, Y)
oldx = X
oldy = Y
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
draw = False
End Sub
Private Sub form_paint()
BackColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
Private Sub timer1_timer()
If Width < Screen.Width Then
Width = Width + 100
Else
Width = 0
End If
End Sub
Private Sub form_keydown(keycode As Integer, Shift As Integer)
End
End Sub