Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Rain Drop Simulation

Hello,

I am trying to make a raindrop simulation with a slider:

The program will be as simple as this:

The slider will go from 0 to 1000 (the amount of rain drops present). The user will be able to change this. Then, the amount of drops will be going from top to bottom at a certain interval.

Code
randomize()
For i = 0 to slider.value
Dim pb As New PictureBox
pb.Width = 25
pb.Height = 25
pb.ImageLocation = "raindrop.png"
pb.Top = Me.Height * Rnd()
picturebox1.left = Me.Width * Rnd()
Me.Controls.Add(pb)
next

I have only tested this so far and it is extremely slow! Anytime the user selects a number above 50, the form just freezes. Is there a better way to do this?

Please advise.
snow drop https://hackforums.net/showthread.php?tid=3964747
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by HardStoNMay 19, 2019 12:04 PM 10 355 May 19, 2019 12:04 PM
Last Post: HardStoN
[.NET] by Reznov80Nov 6, 2018 10:34 AM 0 128 Nov 6, 2018 10:34 AM
Last Post: Reznov80
[Shell] by ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™Mar 28, 2018 12:18 AM 2 182 Mar 28, 2018 12:18 AM
Last Post: Phlox