Results 1 to 4 of 4

Thread: [RESOLVED] Drag and Drop controls Not as easy as it sounds

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    [RESOLVED] Drag and Drop controls Not as easy as it sounds

    I am trying to drag and drop a control simalar to the VS toolbar. The user is going to click on a label which is part of a user control and represents a control, and drag it onto the form thus creating the control where they let go. My issue is if I try to use the drag drop events I only get the NO symbol. And I can't seem to use the mouse coordinates and do it mannually because if I track the coordinates on the user control, once I leave that user control I can't seem to get the mouse coordinates anymore. If I track the coordinates from the form once I enter the user control same thing happens.

    Anyone have any idea how I can do this?

    Thanks
    Last edited by mpdeglau; Oct 25th, 2005 at 12:21 PM.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Drag and Drop controls Not as easy as it sounds

    Anyone have any idea How I can do this. Even something to look into? I've alread tried google and MSDN and couldn't find anything.

  3. #3
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    297

    Re: Drag and Drop controls Not as easy as it sounds

    To get an image of the control use a function like the one here (the code in my post)

    Then to change the drag and drop cursor, have a look at this which shows how to change the cursor during drag and drop into a image ( I used an image created from the text or picture being dragged, you can use the control image)

    It'll take a while, but it should work...

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Drag and Drop controls Not as easy as it sounds

    That wasn't quite what I was looking for. Essentially I needed to get the cursor position on the form after mouse down and mouse move on a button on a user control. I ended up using a timer to check where the cursor is. But thanks for the help. I may use that code in the draging process.

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