So how to fix? I do not want the frames to go away forever. I just wanthem to move on the main form.
Printable View
So how to fix? I do not want the frames to go away forever. I just wanthem to move on the main form.
Handing the DragDrop event on to the form, by taking in account, that X and Y were coordinates on the frame where the drop took place.
The same might apply to other controls which eat up the DragDrop event.Code:Private Sub FrameProto_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Form_DragDrop Source, X + FrameProto(Index).Left, Y + FrameProto(Index).Top
End Sub
Thanks, I got rid of the .visible= false, now much better!!
Yes, but this still doesn't allow you to drop the frame when the mouse is over another frame.
Since all frames are an array, the solution I showed in the previous post allows the dropping as required. And you may remember, you put the .Visible = False there for some reason.
Which might not be important any more if you implement the above DragDrop() event.