|
-
Sep 17th, 2002, 07:17 AM
#1
Thread Starter
Hyperactive Member
Small example..
Hi!
I need to make a program like this:
The left indicator is a time clock, and the right display is the time of day. Your program should commence at 12:00 noon, and as the petri dish should have only two bacteria on it. New bacteria should appear every 10 seconds, one at a time, randomly located and randomly coloured, until 15 bacteria are evident. Your program should then stop, leaving the display on the screen. An exit button should be located somewhere to close the window at the viewer's convenience
Thanks!
Tapan Bhanot,
CEO, Avis Software.
Website: www.avissoftware.com
-
Sep 17th, 2002, 07:23 AM
#2
PowerPoster
What the heck are talking about?!
-
Sep 17th, 2002, 07:25 AM
#3
Thread Starter
Hyperactive Member
Just a small program i am trying to make!
Tapan Bhanot,
CEO, Avis Software.
Website: www.avissoftware.com
-
Sep 17th, 2002, 07:59 AM
#4
Here's a really quick hack for the Bacteria
VB Code:
Private Sub AddBacteria()
Dim posx As Long
Dim posy As Long
Dim col As Long
Dim tmp As String
Dim lngCount As Long
lngCount = Bact.count
posx = (Frame1.Width * Rnd) + 1 'frame as the dish
posy = (Frame1.Width * Rnd) + 1
tmp = Hex(255 * Rnd + 1) 'random colour
tmp = tmp & Hex(255 * Rnd + 1)
tmp = tmp & Hex(255 * Rnd + 1)
Load Bact(lngCount) 'control array of shapes(small circles)
Bact(lngCount).Left = posx
Bact(lngCount).Top = posy
Bact(lngCount).FillColor = "&H" & tmp
Bact(lngCount).Visible = True
If lngCount = 15 Then Timer1.Enabled = False 'timer counts in seconds tile 15
End Sub
I hope this gives you an idea
-
Sep 17th, 2002, 08:00 AM
#5
Fanatic Member
-
Sep 17th, 2002, 09:19 AM
#6
Thread Starter
Hyperactive Member
Thanks man it worked perfect!
Tapan Bhanot,
CEO, Avis Software.
Website: www.avissoftware.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|