Information générale
Catégorie:
Gestionnaire d'écran & Écrans
hi Erick !
click method in cmdMove button is not functioning
i want to do something when click the cmdMove button
pls show me how to do that ?
LOCAL loForm as Form
m.loForm = CREATEOBJECT([formTest])
m.loForm.Show()
RETURN
*******************************************************************************
DEFINE CLASS formTest as Form
nDifXCoord = 0
nDifYCoord = 0
*- Adding objects
ADD OBJECT cmdExit as CommandButton
ADD OBJECT cmdMove as CommandButton
PROCEDURE init()
WITH this
.WindowType = 1
.Caption = [Move the Button Below!]
.Height = 421
.Width = 656
.AutoCenter = .T.
*- Setting Exit button
WITH .cmdExit
.Caption = [\ .Height = 39
.Width = 152
.Top = 360
.Left = 264
.Visible = .T.
ENDWITH
*- Setting Move button
WITH .cmdMove
.Caption = [Move Me Within of the Form]
.Height = 65
.Width = 81
.Top = 24
.Left = 60
.DragMode = 1
.WordWrap = .T.
.Visible = .T.
ENDWITH
ENDWITH
ENDPROC
PROCEDURE DragDrop()
LPARAMETERS oSource, nXCoord, nYCoord
oSource.Left = nXCoord - thisForm.nDifXCoord
oSource.Top = nYCoord - thisForm.nDifYCoord
ENDPROC
*- Exit button
PROCEDURE cmdExit.Click()
ThisForm.Release()
ENDPROC
*- Move button
PROCEDURE cmdMove.MouseMove()
LPARAMETERS nButton, nShift, nXCoord, nYCoord
thisForm.nDifXCoord = nXCoord - THIS.Left
thisForm.nDifYCoord = nYCoord - THIS.Top
ENDPROC
ENDDEFINE
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement