Results 1 to 6 of 6

Thread: Small example..

  1. #1

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459

    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

  2. #2
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    What the heck are talking about?!

  3. #3

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Just a small program i am trying to make!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  4. #4
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    Here's a really quick hack for the Bacteria
    VB Code:
    1. Private Sub AddBacteria()
    2.     Dim posx As Long
    3.     Dim posy As Long
    4.     Dim col As Long
    5.     Dim tmp As String
    6.     Dim lngCount As Long
    7.     lngCount = Bact.count
    8.     posx = (Frame1.Width * Rnd) + 1 'frame as the dish
    9.     posy = (Frame1.Width * Rnd) + 1
    10.     tmp = Hex(255 * Rnd + 1) 'random colour
    11.     tmp = tmp & Hex(255 * Rnd + 1)
    12.     tmp = tmp & Hex(255 * Rnd + 1)
    13.     Load Bact(lngCount) 'control array of shapes(small circles)
    14.         Bact(lngCount).Left = posx
    15.         Bact(lngCount).Top = posy
    16.         Bact(lngCount).FillColor = "&H" & tmp
    17.         Bact(lngCount).Visible = True
    18.     If lngCount = 15 Then Timer1.Enabled = False 'timer counts in seconds tile 15
    19. End Sub

    I hope this gives you an idea

  5. #5
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    i never learned Biology
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  6. #6

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    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
  •  



Click Here to Expand Forum to Full Width