Solved

pop machine

Posted on 2000-03-31
6
191 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 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…

757 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

22 Experts available now in Live!

Get 1:1 Help Now