Changed the default window for my app but the old one still gets opened

I want to start an app with a new splash/login window. (It presently starts with the ‘default’ window which I’ve renamed).

I’ve created my splash window and set it as the default window for the app. It opens as I expect when the app starts in the debugger, but almost immediately the old default window opens on top of it, which is unexpected,

What am I doing wrong? Why does the ‘old’ default window still get opened?

Many thanks

Steve

Search with the “old default” name in your code for a call that may show it, like Old_Window.Show, but not only.

BTW: add a “_Old” suffix to your old window name and look at the list of errors you get.

Search for one that exists in App (or eventually, in your new window).

Thanks for the suggestion. It hadn’t ocurred to to generate errors as a way of finding references…

I’ve done as you suggested, but couldn’t find anything referring to the original window name (once I had changed it to _old) as you suggested.

Anywhere else I can look or check?

Many thanks

Steve

No compile error ?

Search in App Events and in the New Window Events if you call that window (any occurence of its name, but if you use one of the Window Properties…

At last, save the project, delete the Old_Window and run. If something elsewhere is calling Old_Window, you will get an error (and a crash).

Undo once you find where the Old_WIndow is called (or Reload or…).

You can also, but it will take more time to read it, print to pdf your project… unselect any element in the Navigation (left pane) and print… to PDF the project. Then read the pdf (that is the part that will takes time).

Answering my own question - but I wouldn’t have got there without your help…

Becuase implict instance is on and something else is refering to a control on the ‘old’ main window which automatically causes it to show…

I know, I’m only the 94th person to fall into the implicit instance trap today…

Thanks for your patience with this newbie

Best regards

S

1 Like

Fine.

It is not easy to answer to that question.L