CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Join Date
    Nov 2005
    Posts
    95

    Re: dragr frames at run time

    So how to fix? I do not want the frames to go away forever. I just wanthem to move on the main form.
    Last edited by vbcandies; January 29th, 2010 at 11:03 AM.

  2. #17
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: dragr frames at run time

    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.
    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
    The same might apply to other controls which eat up the DragDrop event.

  3. #18
    Join Date
    Nov 2005
    Posts
    95

    Re: dragr frames at run time

    Thanks, I got rid of the .visible= false, now much better!!

  4. #19
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: dragr frames at run time

    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.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured