Important alert: (current site time 7/16/2013 3:14:10 AM EDT)
 

winzip icon

ant simulator!!!! THE SEQUEL!!!!!

Email
Submitted on: 4/27/2001 6:54:08 AM
By: necromunda 
Level: Intermediate
User Rating: By 29 Users
Compatibility: VB 6.0
Views: 30165
 
     OH MY GOD!!!!! IT'S THE ALL NEW AND IMPROVED ANT SIMULATOR!!!!! AND IT'S BEEN IMPROVED AGAIN!! IMPROVED features including: *Screen Saver mode (improved) *(improved) Improved search algorithms *New form layout (improved) *Adjustable form (improved) sizing *Slightly (improved) improved graphical methods *Lots more.....(improved) So download today. Tell your friends, tell their friends. Tell people you meet on the street. Vote!! Pass comment! Tell me to stop with the ants already! NOW!

 

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 :ant simulator!!!! THE SEQUEL!!!!!
'**************************************
Bit blt
sleep
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 6 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 Intermediate 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

4/27/2001 7:01:58 AMhellgrunt

WOW. I am so impressed with this vastly improved version of Ant Sim! You must have spent ages on it. Congrats 8)
(If this comment was disrespectful, please report it.)

 
4/27/2001 7:11:35 AMomar

this is the best thing i have ever seen. I am proud to say that i know him!!!
(If this comment was disrespectful, please report it.)

 
4/27/2001 2:33:38 PMSimon Price

Ha ha, that's pretty cool :-)
(If this comment was disrespectful, please report it.)

 
5/7/2001 10:41:02 PMTeco

This is too cool
(If this comment was disrespectful, please report it.)

 
5/7/2001 11:09:47 PMJason Brimblecombe

This is really good! Visit my website sometime: http://www.jbrimble.net
(If this comment was disrespectful, please report it.)

 
5/8/2001 4:07:32 AMnecromunda

Hello everyone!
Thanks for the posts.

Just wanting to ask if anyone would know how to use the desktop as the background instead of a white background.


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

 
5/9/2001 12:05:49 PMTuomo Hepokangas

Very cool.. 5/5
(If this comment was disrespectful, please report it.)

 
5/11/2001 2:45:56 AMBillSoo

You can copy the desktop using the GetDesktopWindow API call to get the desktop hwnd. Then use the GetDC API call to convert the hwnd to a hDC. Then use BitBlt to copy the desktop image to the picture.

Some caveates though, I was only able to make it work if I set the picture autoredraw property to TRUE. This required putting picture1.refresh commands in a number of places. Also, it worked better when I removed most of the form resizing code and made the form invisible just before I copied the background.
(If this comment was disrespectful, please report it.)

 
5/12/2001 11:49:01 AMCory J. Geesaman

this is awsome, if you want to get the desktop i would suggest u just take a screenshot, that way it looks like it normally would w/ all windows open and stuff, but it will just have the ants, that would rule
(If this comment was disrespectful, please report it.)

 
5/15/2001 6:09:40 AMStefan

Why would you want to make a screenshot of the desktop. Just make your form transparent. Some other projects on this site show you how to do this
(If this comment was disrespectful, please report it.)

 
5/21/2001 1:42:34 PMHyperSonix

I voted 5 globes. Best Code EVER! I loved it! I've got a cool mod that let's you do skins. Can I modify your code with it and send it to you? email me at hypersonix@earthlink.net
(If this comment was disrespectful, please report it.)

 
5/21/2001 10:14:45 PMP. Rosebush

Bravo....amzing what the mind can think up.
(If this comment was disrespectful, please report it.)

 
5/22/2001 1:34:04 PMnecromunda

i can't tell if that's an insult or a compliment......:)
(If this comment was disrespectful, please report it.)

 
5/24/2001 1:44:31 AMdispid

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

 
5/24/2001 4:12:37 PMnecromunda

Hmmm.....maybe its a bug.....
(boom boom)
(If this comment was disrespectful, please report it.)

 
5/29/2001 5:15:52 PMHellmark

very cool code, plus if its good enought for simon its good enough for me. I have a suggestion though, can you have it on a transparent bg, and also have it tell you who ate the most
(If this comment was disrespectful, please report it.)

 
5/29/2001 5:56:22 PMnecromunda

The transparent bg could be a problem but the apples thing will be easy.
Anyone know how to make the form and a picbox transparent?
(If this comment was disrespectful, please report it.)

 
6/9/2001 6:01:16 AMBrett

Hi, great app ! A great way to learn
bitblt and a bit of OO stuff. I've
humbly made some enhancements on it -
features like the ants are assigned a
random speed and health. The speed is
obvious but the health measures how
long the ant will survive. At the end
of each 'day', every ants health is
reduced. But for each apple they eat,
their health is increased. At the end of each 'day', if the ant has bad health it dies automatically.

I worked on the interface a bit too. Just way too much fun ! I plan on adding more stuff - if you would like a copy, please contact me !

Cheers, and Kudos !

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

 
10/13/2001 8:03:58 PMBlackWizzard

waow!
(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.