How to differentiate between first run and application restart (VB.NET)
i have login screen that should appear every first open of the program, the problem is that i have a button to restart the program every new sale operation, so .. the login screen appears every restart of the program and i don't want that to happen i want it just to appear on the first application open.
does anyone has a trick or any way to solve this.
thank you
Re: How to differentiate between first run and application restart (VB.NET)
Look into My.Settings (for Boolean settings) and the FormClosed event (for the main form), and the e.CloseReason property
Re: How to differentiate between first run and application restart (VB.NET)
I think the question to be asked is, why are you restarting the program after every sale operation in the first place? That seems like a less than ideal design choice. If you weren't doing that, then your problem goes away.