Try this:
public
{ Public declarations }
AMouseInteract: TIEMouseInteract;
procedure TForm1.ImageEnView1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
AMouseInteract := ImageEnView1.MouseInteract;
if HiWord(GetKeyState(vk_space)) <> 0 then
ImageEnView1.MouseInteract := [miScroll]
else
ImageEnView1.MouseInteract := AMouseInteract;
end;
Define AMouseInteract as a public var and set AMouseInteract to the ImageEnView1.MouseInteract in the methods where you set the mouseinteract:
procedure TForm1.SelectRect1Click(Sender: TObject);
begin
ImageEnView1.MouseInteract := [miSelect];
AMouseInteract := ImageEnView1.MouseInteract;
end;
procedure TForm1.SelectEllipse1Click(Sender: TObject);
begin
ImageEnView1.MouseInteract := [miSelectCircle];
AMouseInteract := ImageEnView1.MouseInteract;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development