Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change the main project form
#8
(10-14-2020, 04:47 PM)kudzu Wrote: Doing so on new session is not a good idea. SetAsMainForm is a global setting and OnNewSession is threaded. This approach will create issues and could even cause crashes.

If you want to control which form is displayed dynamically use this event on the SC instead and create an instance of the form itself and return it in the var argument:

procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
 
end;

I'm trying to use IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm)

Inside, I simply call:

WebApplication.ShowForm(TfrmDefault, TRUE, TRUE);

and it works. But I must be misusing it, i.e.: what about the “var vMainForm: TIWBaseForm” parameter? – should I be freeing any that is passed in, or setting back the value of the form I create here?
Reply


Messages In This Thread
RE: How to change the main project form - by iwuser - 11-23-2024, 12:04 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)