Search code examples
formslazarus

Lazarus - How to change the order of a start up form


My project was started with a certain form named Form1. Now I have many forms. Now I need to make a new form (i.e., my login form- frmLogin) the start up form.

I went to project options and under forms, I used the arrow (on the side of the forms list) and moved the login form to the top.

Now the login form starts fine. But BEFORE I can input a username, a message box I use on the next form (i.e., Form1) gets shown. The messagebox is in the FormCreate procedure of Form1.

I'm confused about this. Am I missing something? How can I prevent the FormCreate's code from running. Form1 is only called by frmLogin AFTER the user has clicked login and successfully entered a password.


Solution

  • In your project settings: check which forms are auto-created. Normally when you create a new form it is auto-created. I think you don't want that in your app.