Important alert: (current site time 7/16/2013 3:21:52 AM EDT)
 

winzip icon

Flickerless, Smooth Animation using pure VB with No OCXs, DLLs or ASM!

Email
Submitted on: 12/19/2000 10:01:20 AM
By: Douglas J. Puckett  
Level: Advanced
User Rating: By 56 Users
Compatibility: VB 6.0
Views: 34123
author picture
(About the author)
 
     Added New - Fully Functional Screensaver with source using my animation technique! Also added one more new demo - Geometry. Flickerless, Smooth Animation using pure VB with No OCXs, DLLs, ASM or DriectX. Pure VB. This Entry gives you the code that I created and have used in all of my screen savers for years. The code included is pure VB code (with just a few APIs declared and utilized). Most of the code is in the "CodePage.Bas" module. This contains all of the initialization, variable definitions and declarations and animation code. If you like it, give me a vote or two. If I get votes, I'll know you are interested and I'll create a complete documentation package around this. Demos included are... Demo_BouncingBalls.exe - About 30 colored balls bouncing all around the screen (Source included). Demo_BouncingSantas.exe - Bunches of little Santas practicing thier jumping for the upcoming holiday season. Demo_Geometry.exe - Bunches of geometric images floating around the screen. Demo_UFO_ScreenSaver.Scr - Aliens have taken over your desk top. All Demos have full source code in zip format. UFOsaver.scr - A complete, fully functional screensaver using my animation techniques (source included)!!! Thanks. Doug Puckett ( dpuckett@thelittleman.com )

 

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 :Flickerless, Smooth Animation using pure VB with No OCXs, DLLs or ASM!
'**************************************
All in the source download
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.

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 Advanced 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
12/19/2000 10:33:24 AMJB

Cool! this is fast! 5 globes from me!
(If this comment was disrespectful, please report it.)

 
12/19/2000 1:46:12 PMTDS

Great example! Would enjoy more!
(If this comment was disrespectful, please report it.)

 
12/19/2000 2:08:43 PMxXx_VipeI2_xXx

Very! Very! Sweet!
The demo is proof 'nough.
5 earthly globes up!

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

 
12/19/2000 2:47:59 PMPaul Blower

Im yet to go thru this code, but thats seriously nice! Thats direct x qualtiy youve made there.
NICE Job :)

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

 
12/20/2000 12:02:53 AMPhillip O'Neal

Very smooth. Good job.

One small problen: when the screen is 1024x768 or lower works fine, at 1280x1024 or higher the sprites that bounce the highest(off the top of the screen) don't erase completely.
Like this: starting at the bottom of the screen the bottom half of the sprite is not erased, next higher postion a little less than half of the sprite remains and so on. On the way down the closer to the bottom of the screen it gets the more of the top of the sprite remains.

If you could please let me know why this happens.


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

 
12/20/2000 12:56:18 AMRobert Rayment

Excellent, thanks for sharing it!
(If this comment was disrespectful, please report it.)

 
12/20/2000 1:31:40 PMSimon Price

Very smooth! I guess we will need to learn this sort of stuff now, since the latest version of DirectX seems to have forgotton what 2D is :)
(If this comment was disrespectful, please report it.)

 
12/21/2000 5:25:10 AMRik

Santa's bobbles sometimes stay on the screen. But I don't seem to have the high resolution problem the other guy does. :-) (I'm running 1280 x 1024).
(If this comment was disrespectful, please report it.)

 
12/24/2000 8:16:37 AMMaSs

SWEEEEET
nice piece of work
(If this comment was disrespectful, please report it.)

 
12/24/2000 5:19:05 PM---

Thats cool! 5!
(If this comment was disrespectful, please report it.)

 
12/30/2000 10:08:53 AMDoug Puckett

Anyone that may have had a prolem with resolutions of 1280 or higher can now download the code again. Yhe code has been adjusted so the higher resolutions are fine in the demos. I have also added another demo and a screensaver as extra examples. Let me know if you need anything more. Thanks to all for the interest. I will write a tutorial around this soon. Again, Thanks!
(If this comment was disrespectful, please report it.)

 
1/11/2001 1:48:06 AMJason Brimblecombe

Excellent code! You've got my vote. Visit my website sometime: http://www.jbrimble.net
(If this comment was disrespectful, please report it.)

 
1/13/2001 1:28:29 PMFreydaddy

Oh, sweetness!! I give it 5!
(If this comment was disrespectful, please report it.)

 
1/13/2001 3:14:27 PMSimon Cutler

Very ingeneous way to make .scr files. Appreciate the sharin of yer code man. We can all do our part in making open source programming, as this is the way that i've learnt alot of my programming techniques. CHEERS!!
(If this comment was disrespectful, please report it.)

 
7/5/2001 11:28:50 PMMike

Excellent code! You've got my vote.
(If this comment was disrespectful, please report it.)

 
10/31/2001 8:54:58 PMMikey the Tool Maker

If I set the gravity number (-0.5) to any higher, the pieces leave bits of themselves on screen. Maybe it is impossible to move an item more than 1/2 it's size without leaving bits of it hanging about. Is there a fix for this?

Excellent code!!!! Lots to learn from this one. I just need a couple of years or so... yeah, right after I win the lottery!
(If this comment was disrespectful, please report it.)

 
11/3/2001 1:06:50 AMRajinder Verma

Really Cool Code for a beginner. Thanks a lot for sharing it. Rating Ur Code as EXCELLENT.
Keep It Up ;))))
(If this comment was disrespectful, please report it.)

 
4/11/2002 4:00:56 PMHappy Lobster

I love your code! Gave it excellent. But I have 1 question: I want to call mainform.show vbmodal, but when I do there is no animation. How can I set it to be vbModal and have in working?

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

 
4/24/2002 4:58:00 AMSquimp

This is a fantastic piece of work, Very clever and as a beginner I have picked up so many tips. Thanks for sharing, I rate this as excellent!!
(If this comment was disrespectful, please report it.)

 
8/8/2002 10:38:00 AMBrian Matthew Anderson

I was just going over the code for the bouncyballs demo - Very clean and well written. I would highly recommend this to any beginner or intermediate programmer as a good example of well documented, solidly structured code. Thank you for this submission. 5 globes.
(If this comment was disrespectful, please report it.)

 
4/21/2003 5:31:19 PM

Excellent. I could have used this a long time ago!
(If this comment was disrespectful, please report it.)

 
10/18/2005 10:29:58 AMcedie

good job what is this program for again? just joking 5 globes for me....
(If this comment was disrespectful, please report it.)

 
7/9/2006 9:33:50 AMPhillip Ponchot


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

 
7/9/2006 9:34:21 AMPhillip Ponchot

Great job. Excellent code. 5 globes from me.
(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.