Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

pop machine

Posted on 2000-03-31
6
200 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

829 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