VB6 Drag and Drop Label onto another Form
Posted on 2009-05-07
VB6. I have a Label on a PictureBox on Form1 which I want to Drag and Drop onto a PictureBox on a separate Form2. I get error message 425 Invalid object use. Dragging and Dropping the label from one PictureBox to another on the same Form1 works OK.
EDIT: This is not a Drag and Drop problem, it's the Container property. It looks like the 'Container' has to be on the same Form as the Source. Is there a way round this?
Code for Form1:
Private Sub Form_Load()
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Code for Form2:
Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
Set Source.Container = Picture1