Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Continuing where we left off. . . . shapes
Message
De
22/08/2005 19:28:47
 
 
À
22/08/2005 19:03:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01042777
Message ID:
01042781
Vues:
25
This message has been marked as the solution to the initial question of the thread.
>The following code in an image click method puts a shape on that image in a form.
>
>
>
>Private lcName
>lcName = sys(2015)
>backcolor =  255
>Backstyle = 0
>thisform.addobject( lcName, "shape" )
>
>with GETPEM(thisform,lcName)
>   .Move(mcol(thisform.Name, 3),mrow( thisform.Name, 3 )) && the form name should to be unique
>   .Visible = .t.
>endwith
>
>
>
>

You can simplify the code with:
.Visible = .Move(mcol(0, 3),mrow(0, 3 ))
>However, it's position on the screen is controlled by Mcol and Mrow and the form I have contains the image of a map that exceeds the screen size. Therefore, I am searching for a solution that uses coordinates. CurrentX and CurrentY might work. I'll try that.

But, why MCOL and MROW don't be all right ?

You can move the code in MouseUp:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF SYS(1270)=m.this
  thisform.addobject( sys(2015), "shape" )
  with thisform.Controls[thisform.ControlCount] && the last member
     .Move(nXCoord,nYCoord)
     .Visible = .t.
  endwith
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform