0

The sequence is this:

I start my application at one form. After pressing a button, I call another form and hide the first one. After pressing another button, I execute Application.Minimize(). And then, when I maximize the application by pressing the app icon, the first form is shown again.

Does maximizing show all existing forms again?

6
  • I cannot reproduce. Form2 becomes visible when app icon is hit, Form1 remains hidden. It might depend on OS. I have Win 10. Which OS do you have? Mar 22 at 14:52
  • Preferably provide your forms PAS and DFM codes - that way we can eliminate design settings or bad code to be the culprit. Hopefully your translation service gets this text right.
    – AmigoJack
    Mar 22 at 15:59
  • If the first form is your main form, you may need to set application.mainForm := secondForm after you hide the first form.
    – IVO GELOV
    Mar 22 at 16:43
  • 1
    @IVOGELOV In Delphi applications you can't change the MainForm at runtime. Because of that MainForm property is a read-only property. Mar 22 at 18:03
  • 2
    Do both of your forms create their own taskbar icons? If not then it is possible that the taksbar icon belong to your main form and thus clicking on it actually sends WM_SHOWWINDOW to your main form instead to your second form as you might expect. Your second form needs to have its own taskbar icon in order to receive WM_SHOWWINDOW message directly. Mar 22 at 18:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.