Hi.
I'm currently trying to improve the TsMaginier to be able to pick up a color under the cursor (inside the glass form). My goal is to integrate the magnifier inside the TsColorDialog if you start to pickup a screen color. But: I don't know how to retrieve the color under the mouse coordinate inside the glass form.
I've tryed the following:
Code:
procedure TacMagnForm.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
inherited;
TsMagnifier(Caller).FPickColor := MagnBmp.Canvas.Pixels[x, y];
if Assigned(TsMagnifier(Caller).OnMouseDown) then
TsMagnifier(Caller).OnMouseDown(Caller, Button, Shift, X, Y);
if (mbLeft = Button) then
begin
acIsDragging := True;
ReleaseCapture;
Perform(WM_SYSCOMMAND, SC_DRAGMOVE, 0);
end;
end;
But “MagnBmp” seems to be the wrong bitmap which contains the maginified bitmap.
Any idea how to solve this?
Best regards,
Marc