ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 mouse click on ImageEnView

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
DK1970 Posted - Aug 14 2024 : 07:58:17
Hello.
I am using ImageEnView.
At runtime, when I click on the ImageEnView,
Can I know the coordinates of ImageEnView.IECanvas?
Please let me know how to do this.

Daisuke Kazama
3   L A T E S T    R E P L I E S    (Newest First)
DK1970 Posted - Aug 15 2024 : 23:14:14
Thank you very much. You've been very helpful.

Daisuke Kazama
xequte Posted - Aug 15 2024 : 17:00:54
Hi

Although the Mouse position is not passed in click events, you can get the global mouse position:

https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Controls.TMouse.CursorPos

But as Heartware stated, you should use the MouseUp event which includes a click position, which you can convert to Bitmap/Canvas coordinates using:

http://www.imageen.com/help/TImageEnView.XScr2Bmp.html
http://www.imageen.com/help/TImageEnView.YScr2Bmp.html


Nigel
Xequte Software
www.imageen.com
HeartWare Posted - Aug 15 2024 : 03:48:13
You don't get coordinates in OnClck - you'll have to trap OnMouseUp (always use Up and not Down unless you have specific reasons. Why? Because that's how Windows does it. Try clicking and holding mouse down on a button - you only get the OnClick event once you release the mouse button, and only if the mouse is still within the button's surface. The same with Menus and other click-to-select items).

IIRC there's a setting in the properties of the TImageEnView where you can specify if the coordinates are bitmap-relative or component-relative.