Solved

pop machine

Posted on 2000-03-31
6
196 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now