Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving object @ runtime
Message
 
À
05/01/2007 01:13:57
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01181851
Message ID:
01182763
Vues:
11
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform