PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms How to DragDrop controls not text

Reply

How to DragDrop controls not text

 
Thread Tools Rate Thread
Old 24-06-2003, 03:42 AM   #1
Peter Bourget
Guest
 
Posts: n/a
Default How to DragDrop controls not text


Can anyone point me to a good article on using DragDrop with
Windows.Forms.Controls. I am not interested in moving text in ListViews or
anything like that. I want to implement the same functionality as the VS
Forms designer. Move Buttons, TextBoxes etc. Select single or multiple
controls to move.
Thanks !


  Reply With Quote
Old 25-06-2003, 09:13 AM   #2
Jonne Kats
Guest
 
Posts: n/a
Default Re: How to DragDrop controls not text

I don't know a good article, but one way to do it, is to simply trap the
mousedown event, set a mouseDown boolean to true. Trap the mousemove event
and check if mousedown == true, if so set the position of the selected
control according to the mousecoords. Trap the mouseup event and set the
mousedown boolean to false.

HTH..

--
Jonne Kats
Advisor ICT Solutions
www.advisor.nl
http://www.dotnetjunkies.com/weblog/jonne%20kats/


"Peter Bourget" <--phbourget*attbi.com--> wrote in message
news:#ytJ0KgODHA.1556@TK2MSFTNGP10.phx.gbl...
> Can anyone point me to a good article on using DragDrop with
> Windows.Forms.Controls. I am not interested in moving text in ListViews or
> anything like that. I want to implement the same functionality as the VS
> Forms designer. Move Buttons, TextBoxes etc. Select single or multiple
> controls to move.
> Thanks !
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off