VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Screen saver application

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



Rate Screen saver application



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


Download this snippet    Add to My Saved Code

Screen saver application Comments

No comments have been posted about Screen saver application. Why not be the first to post a comment about Screen saver application.

Post your comment

Subject:
Message:
0/1000 characters