Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving object @ runtime
Message
 
To
05/01/2007 01:13:57
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01181851
Message ID:
01182763
Views:
10
Yes simply by changing the .Location of the object (in my case laundry equipment) as the DragOver event fires. That was my first attemt and I expected it to be choppy but it look very smooth.


>>I also added movment of the object as the mouse moves (just like the form designer) by using the DragOver event.
>
>That sounds cool! How'd you accomplish that? By changing the .Location of the control as the mouse moves in the DragOver event? I just tried that and it works pretty slick.
>
>~~Bonnie
>
>
>
>>>But where are you using MouseUp? You're using MouseDown to start the DragDrop aren't you?
>>
>>Originally I did not use drag&drop at all, I just used the object's MouseUp event. It was acctually pretty slick, 1 line of code was all I needed to move a control on the form at runtime using the click-hold-drag mouse method.
>>
>>Now that I use drag&drop I do not use MouseUp any more. I use MouseDown to start the DoDragDrop.
>>I also added movment of the object as the mouse moves (just like the form designer) by using the DragOver event. I'll look into snapping later.
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform