• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

pop machine

I am doing a pop machine vb program for fun. And I would like to see
the balance drops from the machine. For example, if I have a balance of
25 cents, then I will see 25 cents(images) drops from the machine,
is that possible ? How ? It will be nice if I have a sample.

Thanks !
  • 3
  • 2
1 Solution
check out a sample game program and try to use ti for your purpose

Here is a quick and dirty method.  Not necessarily the best way to go about it, but it works.  Create a form and add a command button named command1, and a shape named shape1.  Then copy and paste this code to the form.

Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Command1_Click()
Dim x As Integer

    Shape1.Top = 0
    Shape1.Visible = True
    While x < Me.ScaleHeight
        Shape1.Top = x
        Sleep 50
        x = x + 100
End Sub

You can control the speed at which it drops by changing the x +, and by adjusting the sleep.
tanc02Author Commented:
what if I wnat coins to drop into a container, like
a real pop machine ?
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

tanc02Author Commented:
This question has a deletion request Pending
This question no longer is pending deletion
Why the deletion?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now