Nigel
In a similar vein, it would be very useful to have an ImageEnView procedure that would allow displaying the crop box in a given location on the ImageEnView canvas via code after the ImageEnView.MouseInteract and various ImageEnView1.CropToolInteraction parameters were set. I have been unable to find such a procedure in ImageEnView and have tried unsuccessfully to accomplish this using the Key_Bd events with VK_Return or the Mouse_Event, see below.
procedure TformCrop.StartCropping(tempStatus: Boolean);
begin
if tempStatus = True then
begin
ImageEnViewMiddle.MouseInteract := [ miCropTool ];
ImageEnViewMiddle.Cursor := crIECrossSight;
ImageEnViewMiddle.CropToolInteraction.LockAspectRatio := -1;
ImageEnViewMiddle.CropToolInteraction.LockWidth := tempAbsWidth;
ImageEnViewMiddle.CropToolInteraction.LockHeight := tempAbsHeight;
SetCursorPos(ImageEnViewMiddle.XBmp2Scr(50), ImageEnViewMiddle.YBmp2Scr(50));
// mouse_event(MOUSEEVENTF_LEFTDOWN, ImageEnViewMiddle.XBmp2Scr(50), ImageEnViewMiddle.YBmp2Scr(50), 0, 0);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_MOVE, 50, 50, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
end;
end;
Suggestions??
TIA
John