03-17-2022, 09:43 AM
The recommended way is to use ServerController's OnGetMainForm event. From that event you can inspect the request and decide which form to create.
Please note that you should create the instance of the form and pass it using the vMainForm parameter
procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
if SomeCondition then
vMainForm := TMyMainForm.Create(WebApplication);
end;
Please note that you should create the instance of the form and pass it using the vMainForm parameter
procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
if SomeCondition then
vMainForm := TMyMainForm.Create(WebApplication);
end;