Home > Back-end >  Delphi form switch problem
Delphi form switch problem

Time:10-30

Suppose you have form1, form2, Anderson, ni configuration file;
If you want to achieve when running the program, read the value of Anderson, ni, and known the value of the same show form2, otherwise display form1.
Form1 and form2 are empty without control, don't tell me to use the button or other way to jump, I want to achieve is program runs automatically judgment.
Should how? Which one should give priority to the window?

CodePudding user response:

Ini fomr2 main window, the creation process detection, whether it show form1, hide yourself,

CodePudding user response:

reference 1st floor jaxdong response:
fomr2 main window, the creation process to detect the ini, whether it shows form1, hide yourself,

How to call? Can you give a code under reference?

CodePudding user response:

In the project file write ah.
Var
Ini: Tinifile
The begin
Application. The Initialize;
Read ini the value in the
If show form1 then
Application CreateForm (Tform1 form1);
The else
Application CreateForm (Tform2, form2);
Application. The Run;
  • Related