1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
procedure TForm1.MouseNotify(Kind: TMouseNotifyKind; Button: TMouseButton; X,
Y: Integer);
begin
if Kind = nkMove then
UpdateSplash(X - FArea.X, Y - FArea.Y);
end;
procedure TForm1.SetDesktopDisplay(Value: Boolean);
begin
if FDesktopDisplay = Value then Exit;
FDesktopDisplay := Value;
if FDesktopDisplay then
begin
ToggleButton.ImageIndex := 1;
ToggleButton.Caption := 'Display in window';
end
else
begin
ToggleButton.ImageIndex := 0;
ToggleButton.Caption := 'Display on desktop';
end;
UpdateSplash(-500, 0);
FSplash.Visible := FDesktopDisplay;
if FDesktopDisplay then
MouseMonitor.Add(MouseNotify)
else
MouseMonitor.Remove(MouseNotify);
Invalidate;
end; |
Partager