Results 1 to 5 of 5

Thread: How do I make a good screen saver?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    9
    Grade 12 skilled screen saver?

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97

    what you want.....

    Hey can you be more specific as what you want????
    Anil

  3. #3
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    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

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    9

    Kaverin, thanks for the code but

    how do I make some interesting objects moving inside the screen saver?

  5. #5
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    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
  •  



Click Here to Expand Forum to Full Width