|
-
Oct 30th, 2000, 09:41 AM
#1
Thread Starter
New Member
Grade 12 skilled screen saver?
-
Oct 30th, 2000, 10:05 AM
#2
Lively Member
what you want.....
Hey can you be more specific as what you want????
-
Oct 30th, 2000, 12:43 PM
#3
Fanatic Member
Here's some code I picked up a long time ago (back in the era of VB4 I think, but it still seems to work fine in 5 and 6).
Code:
Option Explicit
'Screen Saver Template
'When you compile this, change the .exe extention to .scr so it can be recognized
'by Windows as a screen saver. If you put it in your windows directory, it will also
'show up in the normal screen saver listing
Private Sub Form_Load()
'use this to load your options/settings form if you have one
'it might be either C or O, but I can't recall
If Left$(LCase$(Command), 2) = "/c" Then
'Load frmOptions
Unload Me
End If
Me.WindowState = vbMaximized
Me.BorderStyle = vbBSNone
Me.Caption = ""
Me.KeyPreview = True
Me.Show
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
CheckActivity
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CheckActivity
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
CheckActivity
End Sub
Private Sub CheckActivity()
'this sub keeps track of "activity"; the screen saver will be terminated
'after enough movements/keys have been detected (generally some events fire after
'Form_Load such as Mouse_Move, so this can screen those out to prevent it from
'being terminated on load
Static nCount As Integer
If nCount > 4 Then Unload Me
nCount = nCount + 1
End Sub
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Oct 31st, 2000, 09:30 AM
#4
Thread Starter
New Member
Kaverin, thanks for the code but
how do I make some interesting objects moving inside the screen saver?
-
Oct 31st, 2000, 03:17 PM
#5
Fanatic Member
Well on that part you're on your own. This is just the skeleton of the screen saver. Most often though, I've seen people stick timers onto the form and then have some code in the Timer event that will draw things or do something else interesting. I'll see if I can dig up a simple one I did that just drew random shapes (which honestly was about as far as I ever went into making a screen saver )
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|