1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VB6 Drag Drop

Discussion in 'Software' started by jonathan03, Jun 6, 2004.

  1. jonathan03

    jonathan03 Private E-2

    I am making a checkers game with VB6. I have drawn the board with labels and the peices are image controls. Both are control arrays. How do I know which peice was moved? Here is my code to move a peice:

    Private Sub lblSquare_OLEDragDrop(Index As Integer, Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    If lblSquare(Index).BackColor = &HFFFFFF Then 'make sure its not a white square
    Exit Sub
    End If
    ImgRed(0).Left = lblSquare(Index).Left
    ImgRed(0).Top = lblSquare(Index).Top
    End Sub

    lblSquare is the name of the control array for each of the squares on the checker board. Index contains the square the peice was moved to, but there are multiple peices. Any ideas on what I'm missing? Thanks for the help.

Share This Page

MajorGeeks.Com Menu

MajorGeeks.Com \ All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ NEW! PC Games \ System Tools \ Macintosh \ Demonews.Com \ Top Downloads

MajorGeeks.Com \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds