Reply to comment
While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?
While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?
Richard Moss
#
gyurisc,
Thanks for the comment. I was working on a small update to the control, but as I haven't got one of the bugs fixed yet I'll just post the function you need in this comment.
[csharp] public virtual Point PointToImage(Point point) { Rectangle viewport; int x; int y;
[/csharp]
Add this to your copy of ImageBox, then call it as you would the PointToClient and PointToScreen methods, for example:
[csharp] private void imageBox_MouseMove(object sender, MouseEventArgs e) { Point point;
[/csharp]
Note that this function always returns 1 more than the actual point, as Point.Empty returns true for 0,0 and I can't return null for a structure. A bit annoying...
Hope this helps!
Regards; Richard Moss