In Inno Setup, I removed the border of the window with the formula
WizardForm.BorderStyle: = bsNone; (That works well.)
At present, I would like to move the window with the mouse. I wrote this code under Lazarus, it works fine, but if I apply the same code in Inno Setup, it does not work. Could you help me please, because I can not find the solution. Thank you.
[Code]
procedure InitializeWizard();
//Remove the border of the window.
var
ClientWidth: Integer;
ClientHeight: Integer;
begin
ClientWidth := WizardForm.ClientWidth;
ClientHeight := WizardForm.ClientHeight;
WizardForm.BorderStyle := bsNone;
WizardForm.ClientWidth := ClientWidth;
WizardForm.ClientHeight := ClientHeight;
end;
//Move the window with the mouse.
var
MouseIsDown: boolean;
PX, PY: integer;
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbLeft then
begin
MouseIsDown := True;
PX := X;
PY := Y;
end;
end;
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if MouseIsDown then
begin
SetBounds(Left + (X - PX), Top + (Y - PY), Width, Height);
end;
end;
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MouseIsDown:=False;
end;
end.
procedure DeInitializeSetup();
begin
end;
// End of file (EOF)