Results 1 to 3 of 3

Thread: How to differentiate between first run and application restart (VB.NET)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2019
    Posts
    2

    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

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    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

  3. #3
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,630

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width