ChrisRChamberlain
Programmer
Hi all
I have a container class added to a form at runtime when a user clicks on the equivalent of a combo button.
The container class is a VFP calculator and has a transparent shape covering the entire container.
The purpose of the shape is to allow the user to move the container to wherever it suits on the form using the right mouse.
To facilitate using the left mouse, the following code in the .MouseDown() event is used to send the shape to the back and the MOUSE command is used to click on the various buttons of the calculator, which in turn send the shape back to the front.
However the actual position of the MOUSE click requires adjustment and the code then needs to be
The actual additional pixels required are probably specific to this class and are probably not applicable elsewhere.
Can anyone advise why the offset occurs?
TIA
![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk
I have a container class added to a form at runtime when a user clicks on the equivalent of a combo button.
The container class is a VFP calculator and has a transparent shape covering the entire container.
The purpose of the shape is to allow the user to move the container to wherever it suits on the form using the right mouse.
To facilitate using the left mouse, the following code in the .MouseDown() event is used to send the shape to the back and the MOUSE command is used to click on the various buttons of the calculator, which in turn send the shape back to the front.
Code:
[COLOR=blue]DO CASE
CASE nButton = 1
[tab]THIS.ZOrder(1)
[tab]MOUSE CLICK AT nYCoord, nXCoord PIXELS
CASE nButton = 2
ENDC[/color]
Code:
[COLOR=blue]DO CASE
CASE nButton = 1
[tab]THIS.ZOrder(1)
[tab]MOUSE CLICK AT nYCoord + 23, nXCoord + 4 PIXELS
CASE nButton = 2
ENDC[/color]
Can anyone advise why the offset occurs?
TIA
FAQ184-2483
Chris ![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk