Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Continuing where we left off. . . . shapes
Message
From
22/08/2005 19:28:47
 
 
To
22/08/2005 19:03:23
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01042777
Message ID:
01042781
Views:
26
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform