Important alert: (current site time 7/16/2013 3:59:38 AM EDT)
 

winzip icon

VB Snow Screen Saver Version!

Email
Submitted on: 10/27/1999
By: Dark Elf  
Level: Not Given
User Rating: By 1 Users
Compatibility: VB 5.0, VB 6.0
Views: 20682
 
     This is an exclusive, screen saver version of the VB Snow program! I have been testing it as my default screen saver for a couple days now, and it works great! There is no config screen for it, but it works just like a normal screen saver should! I added full screen support (640x480), real time rotating snowflakes (done with calculations, not different pictures, real-time mask generation, and all sorts of nifty stuff! I fixed the full screen support to work much better, and added in multiple background support! You can add your own backgrounds in, just edit the backgrnd.dat file! Make sure they are 640x480 also, or it doesn't work well. This new version also adds in support to make this program work as a screen saver! You can right click the .SCR file included in this zip, hit Install, and it works just like a normal screen saver! (Minus the password protection)
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
'Windows API/Global Declarations for :VB Snow Screen Saver Version!
'**************************************
SetPixel
SetPixelV
GetPixel
BitBLT
And Tons more!
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

10/28/1999 2:24:00 AMNewmann

very cool code! congratulations!
(If this comment was disrespectful, please report it.)

 
10/28/1999 9:38:00 AMBruceReid

nice work! Question: what function does the SRCAND bitblit perform? since you are redrawing the whole image at every iteration you don't really need to put a mask down. I commented it out and it still worked. The only reason I ask is that i've had similar probs animating with a BitBlt and could never quite get my head around when to use the "masking" and SRCAND RasterOp.

BitBlt Picture1.hdc, SnowFlakes(j).X, SnowFlakes(j).Y, 29, 29, picSnowLarge(99).hdc, 29, 0, SRCAND

(If this comment was disrespectful, please report it.)

 
10/28/1999 12:46:00 PMJason Merlo

WOW!

When I suggested rotating snow, I meant it as a *joke*!

Way to go! This is some very, very cool stuff. That rotation routine is worth its weight in gold. Congrats!

Now if you could just make a 3-D robotic snowman come out from behind the mountain and catch snowflakes on his tongue...
(If this comment was disrespectful, please report it.)

 
10/28/1999 4:19:00 PMDark Elf

Hmmm... 3D robots. That might take a little while. I'll save that for version 5. :)

As far as Bruce's question - I have no idea. I've always done the SRCAND and then the SRCPAINT, but it does work without the SRCAND... It really doesn't make much of a performance drop unless you have 5000 flakes going (which is too slow anyways... about 4fps here...)

Most of the rendering time is spent in the dots, since I guess MS spent more time optimizing BITBLT than SetPixel...

Glad everyone likes it!

Zane
(If this comment was disrespectful, please report it.)

 
11/13/1999 6:50:00 AMme

Hmmm, Missing something ...


MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode =0 'NotAnMTSObject
End

I keep getting an "Invalid Outside Procedure" error message.
(If this comment was disrespectful, please report it.)

 
11/16/1999 1:59:00 PMLuke

!!!
I clicked the "Full Screen" button and it changed the display settings. I closed the program after that and it "restored" them. But my start menu was floating in the air!!! I don't know if it was just my computer doing that or if it is a bug. Thought I would just tell you that :)
(If this comment was disrespectful, please report it.)

 
11/17/1999 2:06:00 PMDark Elf

The full screen feature wasn't very well implemented in this version, I may post a new one in a day or so, that remembers which screen setting you used, etc...

This new version makes a dcecent screen saver, provided you turn off your normal one.

Zane
(If this comment was disrespectful, please report it.)

 
11/30/1999 5:09:00 PMsteve

I'm running windows 95 and using vb5, after unzipping the file, right clicking the .scr file, and trying to open it I get an error message that reads;
required .dll file
MSVBVM60.DLL was not found.
Even trying to run the exe file gave me this message, any solutions.
Grateful
(If this comment was disrespectful, please report it.)

 
11/30/1999 5:16:00 PMDark Elf

This program was written in VB6 - you need the VB Runtime files for this to work properly. They are available at just about any download site on the net. Try www.download.com and search for VB 6 runtime files.

You might try opening the .VBP file in notepad, remove the line which says RETAINED=? (0 or 1, I'm not sure)
and then open it in VB5. It -might- work then, but I have no way of testing it.

Zane

(If this comment was disrespectful, please report it.)

 
2/14/2000 9:21:34 AMChris L[Ive]Wire

Hi.

Quality Code. I'm jealous :o)
There's just 1 very slight problem that could make the whole lot end in tears:

The refresh rate is not restored when the app is terminated. Things could get very nasty if the one it defaults to is not suported by the monitor (I tested this on NT4sp6a btw). Prehaps using

'GetDeviceCaps(ByVal hdc As Long, ByVal nIndex As Long) as Long'

may be a more preferable method of retrieving the display information.

Anyway, fantastic :o)

Chris
(If this comment was disrespectful, please report it.)

 
8/13/2001 8:08:53 PMKarl

God...I went to school with you for 3 years and I'm finding out only now that you post to PSC?? Great program Zane...Congratuations

Later
Karl
(If this comment was disrespectful, please report it.)

 
11/7/2004 4:14:36 AMRobert Rayment

Very nice but I find it messes up my Desktop layout. I have a Restore Desktop program but that wouldn't work properly after running the scr. I had to restart so that I could reorder the Desktop icons.

(If this comment was disrespectful, please report it.)

 
4/21/2005 12:10:57 PMMax Christian Pohle

contestwinner? mmm... I should start to write screensavers :-/
(If this comment was disrespectful, please report it.)

 
4/21/2005 10:11:48 PM

It was written nearly 6 years ago, you didn't have to write a per pixel lighting 3d engine screensaver to win a contest back then :p

The stuff I write in VB now I couldn't post here, but it takes 8 high end PC systems to run one application, which is for military training. And it's all done in VB.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.