Results 1 to 6 of 6

Thread: vb screensavers ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    23

    Question

    Hi everbody!
    can anyone tell me if it is possible to create simple screensavers in VB,and if so how do you actually install AS a screensaver?
    Thanks in advance

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341

  3. #3
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    i know that if you rename your program to .scr and put it in the windows directory then you can use it as a screensaver but i don't know how you put the code in for a settings button.

    Merlin ¿

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Location
    LewZer-LanD
    Posts
    120
    Make a new project with 3 forms and a module.
    rename forms to: Saver Settings & Changepass
    In the project properties, set the startup object to "Sub Main"

    In the module put this:

    Code:
    Sub Main()
    If App.PrevInstance Then   ' If already running, Exit.
    End
    Else
    If InStr(Command$, "/c") = 1 Then 'Show the Settings Dialog
    settings.show 1  
    ElseIf InStr(Command$, "/a") = 1 Then 'Password button
    changepass.show 1
    ElseIf InStr(Command$, "/s") = 1 or InStr(Command$, "/S") = 1 Then 'Show the screen saver!
    saver.Show 1
    Else
    End
    End If
    End If
    End Sub
    That is just the basics of a screen saver!

    Some other code to find that every screen saver needs:[list=1][*] Disable Control-Alt-Delete![*] Disable Start Button[*] Disable Control-Escape[*] Disable Alt-Tab[*] Disable Alt-F4[*] Make mousemove exit saver[*] Make keypress exit saver[*] Add Password Support![*] A GOOD IDEA!! (I have seen so many bad ones)[/list=1]

    Oh yea.. I forgot, when Saving as an exe.. rename "EXE" to "SCR" (e.g. "TIGHT.SCR") and after compiled, right click on the file from explorer, and hit install.

    Hope This Helped!

    Any more questions? E-mail me. LaTerZ

    [Edited by da404LewZer on 11-12-2000 at 08:09 PM]
    Kid A

    18 Year Old Programmer
    Visual Basic 6 & .NET Enterprise, ASP, WinXP (Advanced Server) Administration, HTML, Graphic Arts, Winsock, Learning VC++ and now maybe C#.. heh
    [vbcode]
    'back in the day vb6 code
    Private Sub My_Life()
    If Hour(Now) > 3 And Hour(Now) < 13 Then
    Status = "Sleeping"
    Else
    Status = "Computing"
    End If
    End Sub
    [/vbcode]

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    What's the API call to get Windows to show your screen saver in the Preview box?

    Thanks,
    Josh

  6. #6
    Lively Member
    Join Date
    Mar 2000
    Location
    LewZer-LanD
    Posts
    120
    umm.. i will have to get back to you at a later time, cuz i'm kinda in school right now.. hehe, and i dont remember all the code off the top of my head.. i'll have to go throught my "vault" of code when i get home, but i will get back to you soon.

    Be Patient!

    Kid A

    18 Year Old Programmer
    Visual Basic 6 & .NET Enterprise, ASP, WinXP (Advanced Server) Administration, HTML, Graphic Arts, Winsock, Learning VC++ and now maybe C#.. heh
    [vbcode]
    'back in the day vb6 code
    Private Sub My_Life()
    If Hour(Now) > 3 And Hour(Now) < 13 Then
    Status = "Sleeping"
    Else
    Status = "Computing"
    End If
    End Sub
    [/vbcode]

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