visual basic'te basit bir screensaver

Programlama ve Script dilleri konusunda bilgi paylaşım alanıdır.
Cevapla
windows
Byte1
Byte1
Mesajlar: 45
Kayıt: 20 Haz 2006, 23:52

visual basic'te basit bir screensaver

Mesaj gönderen windows »

Kod: Tümünü seç

'Bir modül ac ve bu kodu pastele
Declare Function ShowCursor Lib "user32" (ByVal fShow As Integer) As Integer
Global maxLines As Integer
Sub endScrnSave()
showmouse
End
End Sub
Sub HideMouse()
While ShowCursor(False) >= 0
Wend
End Sub
Sub main()
BlankForm.Show
End Sub
Sub showmouse()
While ShowCursor(True) < 0
Wend
End Sub

'Formuna bir tane timer ekle interval=100 yap
'Formun özelliklerini border style=none yap
'Formun backcolor'unu siyah yap ve asagidaki kodu pastele.
'exe file yaparkende exe yi scr olarak degistir windows\ system yapistir. 
'hadi kolay gelsin. 

Dim lastX, lastY
Dim numlines
Sub form_Keydown(Keycode As Integer, Shift As Integer)
endScrnSave

End Sub
Private Sub Form_Load()
Move 0, 0, Screen.Width, Screen.Height
HideMouse
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If IsEmpty(lastX) Or IsEmpty(lastY) Then
lastX = X
lastY = Y
End If
If Abs(lastX - X) > 2 Or Abs(lastY - Y) > 2 Then
endScrnSave
End If
lastX = X
lastY = Y
End Sub
Cevapla