Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag an Image
Message
De
19/02/2009 12:35:58
 
 
À
19/02/2009 11:53:38
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
01382908
Message ID:
01382938
Vues:
154
This message has been marked as the solution to the initial question of the thread.
>>That was kind of cool, but whenever I try to drag the image, it flies off the form in the direction I drag it.

Sorry, that's my bad conversion from form moving code!

Change the MouseMove() to this:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
LOCAL lnDifferenceX, lnDifferenceY
IF nButton = 1 AND (THISFORM.mousedownx != 0 OR THISFORM.mousedowny != 0)
  m.lnDifferenceX = m.nXCoord - THISFORM.mousedownx
  m.lnDifferenceY = m.nYCoord - THISFORM.mousedowny
  THIS.Move(THIS.LEFT + m.lnDifferenceX, THIS.TOP + m.lnDifferenceY, This.Width, This.Height)
  THIS.MouseDown(nButton, nShift, nXCoord, nYCoord)
ENDIF
Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform