How to get the location of mouse point?
Moderators: SDS, support, admin
How to get the location of mouse point?
I don’t know how to get the location of clicking(mouse).
It may use 'Point(,)'. But I don’t know exactly.
Let me know it.
It may use 'Point(,)'. But I don’t know exactly.
Let me know it.
Re: How to get the location of mouse point?
Hello,
To get the location of the mouse pointer, you should use the OnMouseDown event. Please note that this and other similar events don't have separate event members in AxSgCADEditor class, but use the common OnProcess member which returns the different event data through the OnProcess event handler.
The OnMouseDown event is disabled by default, if you want this event to be raised when clicking in the drawing area, you should enable it (or "sign to the event" in terms of CADEditorX) by processing the following XML command:
Once the OnMouseDown event is occured, the OnProcess event handler returns the following XML data:
In the given XML string, X and Y determine the on-screen point coordinates relative to the top-left corner of the drawing area, while point determines the location of the same point in CAD coordinates.
Mikhail
To get the location of the mouse pointer, you should use the OnMouseDown event. Please note that this and other similar events don't have separate event members in AxSgCADEditor class, but use the common OnProcess member which returns the different event data through the OnProcess event handler.
The OnMouseDown event is disabled by default, if you want this event to be raised when clicking in the drawing area, you should enable it (or "sign to the event" in terms of CADEditorX) by processing the following XML command:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<signtoevent Event="OnMouseDown" Enabled="True"/>
</cadsofttools>
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">
<Results>
<Result Instruction="OnMouseDown" Type="event" guid="{60170C89-54C9-455A-99C7-B775B03CED1F}">
<Output Button="LBUTTON" X="334" Y="199" point="-1.00857050452783,-22.8609314359638" Shift="-494141432"/>
</Result>
</Results>
</cadsofttools>
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support