Showing window before Window1(main window)

I’m trying to make a separate window to handle user product key.
In App open event, I check if the product key information exists or not.

If there is no proper information there, a ProductKey window pops up.
Here, I have a problem.

When the ProductKey window pops up, the main window(window1) also pops up.
I want to show user a ProductKey window only before they pass the proper authentication.

How can I do that?

Thanks.

How are you handling the main window? Is it the default window? You need to handle this yourself. Your app.open should do something like:

if not registered ProductKeyWindow.ShowModal end if MainWindow.show

Thank you.
ShowModal matters.

It works well now.

It’s that simple.