Dim v as Integer
Private Sub pict_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
v = Index
pict(v).Drag vbBeginDrag
End Sub
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
pict(v).Move X, Y
pict(v).Visible = True
pict(v).DragIcon = LoadPicture(App.Path & "\no.cur")
End Sub
Private Sub pict_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
pict(v).Visible = True
End Sub
Private Sub pic_DragOver(Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
Select Case State
Case vbEnter
pict(v).DragIcon = LoadPicture(App.Path & "\yes.ico")
Case vbLeave
pict(v).DragIcon = LoadPicture(App.Path & "\no.cur")
End Select
End Sub
Private Sub pict_DragOver(Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
Select Case State
Case vbEnter
pict(v).DragIcon = LoadPicture(App.Path & "\yes.ico")
pic(v).Picture = pict(v).Picture
Case vbLeave
pict(v).DragIcon = LoadPicture(App.Path & "\no.cur")
End Select
End Sub
pict() - это перетаскиваемые пикчеры
pic() - это те пикчеры с которыми будет проверка на совпадение картинок..
Пока делал просто при наведении первого на второй меняется курсор и во второй загружается картинка первого (но не работает
), а как сделать проверку на совпадение ещё не думал...