01-21-2021, 11:11 AM
You can use ServerController.OnGetMainForm event.
This event triggers just before rendering the first form for that session. The session has already been created and you have all information for it:
Then, based on this information you can set vMainForm variable to the specific form to handle that client.
This event triggers just before rendering the first form for that session. The session has already been created and you have all information for it:
Code:
procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
var
WebApp: TIWApplication;
w, h: Integer;
isMobile: Boolean;
begin
WebApp := gGetWebApplicationThreadVar;
if Assigned(WebApp) then
begin
w := WebApp.FormWidth;
h := WebApp.FormHeight;
isMobile := WebApp.Browser.IsMobile;
end;
end;
Then, based on this information you can set vMainForm variable to the specific form to handle that client.