Announcement

Collapse
No announcement yet.

How would I program a screensaver ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How would I program a screensaver ?

    Could anyone point me in the right direction.
    How would I program a screensaver in PBDLL6.0 (or CC2.0 if it's easier).

    Perhaps they are not programmed, just put into a .scr file in some strange format???

    Any pointers greatly appreciated.

    IanMc

    Ok, I found this website http://www.wischik.com/scr/howtoscr.html
    and it seems to say a lot about programming screen savers in win32
    If only I was a bit better at windows programming.

    Perhaps if we could come up with a basic screensaver then we could all write 'modules' for it that would do different things.
    (I could then steal these and use them in my screensaver )

    IanMc


    [This message has been edited by ian mcallister (edited January 31, 2000).]

  • #2
    I have just posted a complete PB/DLL 6.0 Screen saver to the source code
    section. Please feel free to use and modify as you whish. It's based on
    Dave Navarro's KOOL sample and I have added some comments to make it
    somewhat understandable.

    It even has routines for calling up the password dialog and a custom-built
    "settings" dialog, etc. I'm not 100% sure about it, but have used it myself
    for a while here and it seems to work like it should..

    PS. A Screen Saver is basically an ordinary EXE file that you simply rename
    to .SCR and place in the Windows\System\.. directory (or Windows directory).


    [This message has been edited by Borje Hagsten (edited January 31, 2000).]

    Comment


    • #3
      Is it up the the application to terminate itself or does it start when windows starts but stay hidden?
      In other words does it process a message or is it just a program that makes cool colors etc and terminates when a user moves the mouse or touches a key?



      -------------
      Scott Turchin


      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        A screen saver is started by Windows, but it's up the screen saver to
        terminate itself, so yes - it has to process messages.

        I have just made a few corrections to the sample I posted in the source
        code section, because as it turned out, the first code didn't terminate
        itself properly if a password never had been used before. It's ok now.

        Comment


        • #5
          wow! that is way kool!!!

          take a look everyone it's at<font face="courier new, courier" size="3"><pre> http://www.powerbasic.com/support/pb...ad.php?t=22824
          [/CODE]

          now, how would i put some text and a .gif in it ?

          maybe a url ?


          who can write some even more cool graphiccy type stuff to put in it ?

          this is great!

          ian

          Comment


          • #6
            What about programming the screen-corner hotspots ?
            Is that very difficult ?

            You know it's only a little thing but it's stuff like this that can get PB recognized!


            Ian

            Comment


            • #7
              Borje:
              There is a little "bug" in the program. Look at the taskbar after
              stopping it. Not always, but many times you will see a
              blank un-named application down there. I've tried other
              VB screensavers and windows supplied ones and none leave that
              open empty box in the taskbar but your program. I am currently
              looking what may be doing that, but if you already fixed that,
              great! Let us know.
              --Barry

              ------------------
              Barry

              Comment


              • #8
                Hm, long time since I worked with it. Can't reproduce the problem
                here, but when I look at the code, in WndMain, WM_DESTROY does not
                return zero. It should be: FUNCTION = 0 : EXIT FUNCTION

                Could also be something with the timer. Maybe safer to move SetTimer
                to WM_CREATE and KillTimer to WM_DESTROY? Yep, should be safer.

                Have some very busy weeks ahead of me, but as soon as I can, I'll
                have a closer look at it. It works (I think), but should be using
                special screen saver functions and window classes instead


                ------------------

                Comment


                • #9
                  Barry - are you, by any chance, using Windows 98? I noticed a lot of programs doing that under Win98 (but never under Win95); leaving open, but empty buttons on the taskbar after they terminate. [email protected] does it; the MAME arcade emulator does it (in fact, MAME leaves one behind for every game you play, even while you're still running the program!), and the "ATI Player" application that came with my video card does it when I play an MPEG full-screen...

                  It seems to occur primarily with programs that switch video modes and, frankly, I think it's a bug (excuse me, an "undocumented feature") introduced in Win98, because I've never seen these same programs do it under Win95... Micro$oft undoubtedly changed something again without telling anyone. :/

                  ------------------

                  Comment


                  • #10
                    I see that quite often with Windows 95a... on one of my machines (that runs a full-screen DOS app) shares it's printer to the network. Occasionally, the print manager will pop up with an out-of-paper message, and occasionally it will leave one of these phantom buttons on the task bar when the paper bin is refilled (along with the minimized DOS app button). This seems to be residue of the print manager software rather than the Windows Spooler itself.

                    Also, another Win95 machine here exhibits the same symptom when my accounting program terminates... this is quite a regular event too.

                    I keep meaning to try pressing F5 (to refresh Explorers desktop & taskbar) when I see one of these phantom buttons, but usually someone else clears it before I get a chance to "experiment"

                    Has anyone investigated MSKB about this? I seem to recall someone mentioning a KB article on this behavior.

                    ------------------
                    Lance
                    PowerBASIC Support
                    mailto:[email protected][email protected]</A>
                    Lance
                    mailto:[email protected]

                    Comment


                    • #11
                      Yes, I do use Win98. I do see phantom items at times, but they go
                      away in a few moments. The one with the screen saver does not. I
                      do not have the phantom window with VB Screen savers.
                      I will check what Borje states on the return to see if that
                      corrects the problem.

                      -- Barry


                      ------------------
                      Barry

                      Comment


                      • #12
                        Sorry to bring back to life this thread. The screensavers doesnt seem to work anymore.
                        I think it was for older windows. If someone knows why i would appreciate some help.

                        Comment


                        • #13
                          If newer O/S or UAC enabled maybe running a screensaver requires certain permissions?
                          Michael Mattias
                          Tal Systems (retired)
                          Port Washington WI USA
                          [email protected]
                          http://www.talsystems.com

                          Comment


                          • #14
                            You are right michael. I will look into this. Thanx!

                            Comment

                            Working...
                            X