Delphi Change main form while application is running

后端 未结 8 1808
无人及你
无人及你 2020-12-03 06:07

I have this problem. When I hide my main form, then the taskbar icon of my application is also hidden. I saw a new question about this problem as well and the answers didn\'

8条回答
  •  失恋的感觉
    2020-12-03 06:23

    In the current Delphi implementation, I am sure that there are no consequences using a pointer to change Application.MainForm.

    If you look into TApplication class, you can see that FMainForm is used only to check if the application has at least one form, and iterates the main loop inside the TApplication.Run method while the FMainForm exists. If you do not want to use a pointer to hack this property, you can implement your own TApplication class, like TMyApplication, copy all the routines inside it and define MainForm property to read and write

提交回复
热议问题