Results 1 to 6 of 6

Thread: Drag And Drop Icon Help!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Lindenwold, NJ, USA
    Posts
    67
    I am making a slot machine game. well to put coins in you click on a money bag and drag it up to the coin slot. you can put up to 3 coins in. But I have a problem. When I put this in the destination control:

    Code:
    Private Sub hhh_DragDrop(Source As Control, X As Single, Y As Single)
    coinsin = coinsin + 1
    Label3.Caption = "Coins In:" & coinsin
    End Sub
    It displays one coin in but when you go to put more coins in it doesnt show!!! HELP!!
    Frankie Weindel
    VB 6 Learning Edtion SP3

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Where do you have coinsin declared?

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Change your code to this:
    Code:
    Private Sub hhh_DragDrop(Source As Control, X As Single, Y As Single)
    Static coinsin As Integer
    coinsin = coinsin + 1
    Label3.Caption = "Coins In:" & coinsin
    End Sub
    This should solve the problem.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Lindenwold, NJ, USA
    Posts
    67

    Unhappy

    that doesnt work
    Frankie Weindel
    VB 6 Learning Edtion SP3

  5. #5
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Strange, it works fine for me. Can you give me some more code, maybe there's a bug somewhere.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Lindenwold, NJ, USA
    Posts
    67

    Talking

    I figured it out thanks!
    Frankie Weindel
    VB 6 Learning Edtion SP3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width