Solved

pop machine

Posted on 2000-03-31
6
201 Views
Last Modified: 2012-05-04
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 !
0
Comment
Question by:tanc02
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:VBGuru
ID: 2673673
check out a sample game program and try to use ti for your purpose

http://www.gamepl.com/space.zip
0
 
LVL 3

Expert Comment

by:jjmartin
ID: 2673873
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
        DoEvents
        Sleep 50
        x = x + 100
    Wend
   
End Sub

You can control the speed at which it drops by changing the x +, and by adjusting the sleep.
0
 
LVL 1

Author Comment

by:tanc02
ID: 2673899
what if I wnat coins to drop into a container, like
a real pop machine ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:tanc02
ID: 2794931
This question has a deletion request Pending
0
 
LVL 3

Expert Comment

by:jjmartin
ID: 2797634
This question no longer is pending deletion
0
 
LVL 3

Accepted Solution

by:
jjmartin earned 100 total points
ID: 2797635
Why the deletion?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question