home *** CD-ROM | disk | FTP | other *** search
- 4-15-93
-
- This program is for demo purposes only, I do not want you to send me
- any money. I just want to share a program I had fun writing. This
- program was fun to me in that it was possible to do a windows 3.1
- screen saver entirely in visual basic and windows calls without
- additional DLLs required.
-
- This is a screen saver written in visual basic 2.0 (standard
- edition). The program actually cycles between several different
- screen savers within the same program to give quite a bit of
- variety. This program is based on an example in "Learn Programming
- and Visual Basic 2.0" by John Socha and Sybex Inc.
-
- Most of the savers work by starting at random positions with zero
- velocity and acceleration vectors. Then each time through a random
- acceleration is added to the velocities. When an object gets to the
- edge of the screen the velocities sign is set to bring it back into
- screen which then looks to the user as if the object bounced off the
- edge of the screen. Also when the velocity reaches a certain limit,
- the velocity is set to zero to prevent things from getting too out
- of hand.
-
- The grabbing of the desktop pixels was based on Jonathan Zuck's
- screen-capture utilities in the November issue of Windows Tech
- Journal. The desktop animation is done by using the windows DLL
- 'BitBlt' and experimenting using the BC++ reference guide (not the
- best source).
-
- Disclaimers: I have no idea what the side effects of this program
- may be on your system. The program is provided as an example at no
- charge. I am not a windows expert, and the program is provided as is
- without any warranties or obligations.
-
- This program was developed on a 386/40MHz clone with a JDR VGA 1024+
- card (ET4000 based) using Visual Basic 2.0 (therefore the saver needs
- VBRUN200.DLL to run). The line drawings are fast enough on this
- machine, but the screen rolling tends to be jerky at the faster
- speeds.
-
- Lessons Learned:
-
- Application Title must start with 'SCRNSAVE' and has maximum length
- that is recognized.
-
- I was using a VB clock program that while minimized would change
- caption to show time. For some reason changing the caption
- would prevent windows from calling the screen saver.
-
- In the windows desktop, I set timeout interval before saver is called
- to 1 minute for testing. I found that the display got slower
- and slower. Then when I would move the mouse, the display
- would change many times before returning to windows. It seems
- that windows was calling another instance of the program every
- minute. I don't know why this is, but to fix the problem the
- program now checks for previous instances when it starts up,
- and then quits if another instance is already running.
-
- PS -- even though I have Borland C++ and am a C programmer, I much
- prefer the visual basic development environment for forms,
- debugging, etc.
-
-
- Bruce McLean
- 800 S. HW. 1417 #1214
- Sherman TX 75090
- CIS: 71413,2664
-