2

I want to set the focus on the edit box again after displaying message.

portno := Edit.Text;
if (portno = '') then
begin
  MsgBox('Enter Port Number to proceed.', mbInformation, MB_OK);
  Result := False;
end
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992

1 Answers1

1

Set TForm.ActiveControl of the WizardForm:

WizardForm.ActiveControl := Edit;

This answer shows this in action:
Port range validation for data input in Inno Setup

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992