cogier wrote: ↑Thursday 25th November 2021 12:58pm
I am happy to help but would prefer that you post your queries here so that others can assist as well, I don't know it all! Based on the information I have, you are in Mexico and your time zone is GMT-8, mine is GMT, so responses will take a little time.
However, if it helps, you can email me at admin AT gambas DOT one.
Awesome, I will post here then.
This is my main struggle right now. Each piece of the puzzle has an assigned place on the chart. Pieces go somewhat like this 16 15 14 13
12 11 10 9
8 7 6 5
4 3 2 1
On the right of the screen I have a set of pictures boxes arranged randomly where the user can grab one and place them into of the above. What I dont know to do this; I.E. Lets say the user wants to put piece #5 of the puzzle into the spot where piece #1 should go, I need the code to only allow the drop if the spot he wants to move matches the place where he wants to put it. There is an attempt in this code in a subroutine called "matching". I would appreciate if yall could get me onto the right track. Mario. PS. Mario is my name
[ code]Public Sub Form_Open()
PictureBox2.Drop = True
PictureBox3.Drop = True
PictureBox4.Drop = True
PictureBox5.Drop = True
PictureBox6.Drop = True
PictureBox7.Drop = True
PictureBox8.Drop = True
PictureBox9.Drop = True
PictureBox10.Drop = True
PictureBox11.Drop = True
PictureBox12.Drop = True
PictureBox13.Drop = True
PictureBox14.Drop = True
PictureBox15.Drop = True
PictureBox16.Drop = True
PictureBox17.Drop = False
PictureBox30.tag = "1.jpg"
PictureBox30.Picture = Picture["1.jpg"]
PictureBox29.tag = "2.jpg"
PictureBox29.Picture = Picture["2.jpg"]
PictureBox23.tag = "3.jpg"
PictureBox23.Picture = Picture["3.jpg"]
PictureBox27.tag = "4.jpg"
PictureBox27.Picture = Picture["4.jpg"]
PictureBox21.tag = "5.jpg"
PictureBox21.Picture = Picture["5.jpg"]
PictureBox18.tag = "6.jpg"
PictureBox18.Picture = Picture["6.jpg"]
PictureBox31.tag = "7.jpg"
PictureBox31.Picture = Picture["7.jpg"]
PictureBox24.tag = "8.jpg"
PictureBox24.Picture = Picture["8.jpg"]
PictureBox33.tag = "9.jpg"
PictureBox33.Picture = Picture["9.jpg"]
PictureBox26.tag = "10.jpg"
PictureBox26.Picture = Picture["10.jpg"]
PictureBox19.tag = "11.jpg"
PictureBox19.Picture = Picture["11.jpg"]
PictureBox32.tag = "12.jpg"
PictureBox32.Picture = Picture["12.jpg"]
PictureBox28.tag = "13.jpg"
PictureBox28.Picture = Picture["13.jpg"]
PictureBox22.tag = "14.jpg"
PictureBox22.Picture = Picture["14.jpg"]
PictureBox20.tag = "15.jpg"
PictureBox20.Picture = Picture["15.jpg"]
PictureBox25.tag = "16.jpg"
PictureBox25.Picture = Picture["16.jpg"]
End
Public Sub PictureBox30_MouseDrag()
drag.icon = Last.Picture
PictureBox30.Drag(PictureBox30.Tag)
End
Public Sub PictureBox17_Drop()
'PictureBox17.Picture = Picture[Drag.data]
matching()
End
Public Sub matching()
If PictureBox30.Picture = PictureBox17.Picture
PictureBox17.Drop = True
Endif
End
'
'
Public Sub PictureBox29_MouseDrag()
drag.icon = Last.Picture
PictureBox29.Drag(PictureBox29.Tag)
End
Public Sub PictureBox15_Drop()
PictureBox15.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox23_MouseDrag()
drag.icon = Last.Picture
PictureBox23.Drag(PictureBox23.Tag)
End
Public Sub PictureBox16_Drop()
PictureBox16.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox27_MouseDrag()
drag.icon = Last.Picture
PictureBox27.Drag(PictureBox27.Tag)
End
Public Sub PictureBox14_Drop()
PictureBox14.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox21_MouseDrag()
drag.icon = Last.Picture
PictureBox21.Drag(PictureBox21.Tag)
End
Public Sub PictureBox13_Drop()
PictureBox13.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox18_MouseDrag()
drag.icon = Last.Picture
PictureBox18.Drag(PictureBox18.Tag)
End
Public Sub PictureBox11_Drop()
PictureBox11.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox31_MouseDrag()
drag.icon = Last.Picture
PictureBox31.Drag(PictureBox31.Tag)
End
Public Sub PictureBox12_Drop()
PictureBox12.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox24_MouseDrag()
drag.icon = Last.Picture
PictureBox24.Drag(PictureBox24.Tag)
End
Public Sub PictureBox10_Drop()
PictureBox10.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox33_MouseDrag()
drag.icon = Last.Picture
PictureBox33.Drag(PictureBox33.Tag)
End
Public Sub PictureBox9_Drop()
PictureBox9.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox26_MouseDrag()
drag.icon = Last.Picture
PictureBox26.Drag(PictureBox26.Tag)
End
Public Sub PictureBox7_Drop()
PictureBox7.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox19_MouseDrag()
drag.icon = Last.Picture
PictureBox19.Drag(PictureBox19.Tag)
End
Public Sub PictureBox8_Drop()
PictureBox8.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox32_MouseDrag()
drag.icon = Last.Picture
PictureBox32.Drag(PictureBox32.Tag)
End
Public Sub PictureBox6_Drop()
PictureBox6.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox28_MouseDrag()
drag.icon = Last.Picture
PictureBox28.Drag(PictureBox28.Tag)
End
Public Sub PictureBox5_Drop()
PictureBox5.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox22_MouseDrag()
drag.icon = Last.Picture
PictureBox22.Drag(PictureBox22.Tag)
End
Public Sub PictureBox3_Drop()
PictureBox3.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox20_MouseDrag()
drag.icon = Last.Picture
PictureBox20.Drag(PictureBox20.Tag)
End
Public Sub PictureBox4_Drop()
PictureBox4.Picture = Picture[Drag.data]
End
'
'
Public Sub PictureBox25_MouseDrag()
drag.icon = Last.Picture
PictureBox25.Drag(PictureBox25.Tag)
End
Public Sub PictureBox2_Drop()
PictureBox2.Picture = Picture[Drag.data]
End[/code]