Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21916

Best way to restart an application

$
0
0
I have a program that dynamically loads cells (a cell is one UC) in a picturebox one below the other so they have to be scrolled to see all of them. User is allowed to add new cells (which will load at the bottom of the list) or user can delete any cell in which can I need to remove it from the list, move up all cells below it and re-index the cells.

Rather than going through all of this using code I figured it might be easier to just remove the entry from the INI file and then tell user he has to reload the app. Doing this will cause no problems to anything that has already been done as everything done is kept in the INI file. The INI file contains an entry for each cell and within that entry it stores all data that has been changed by user.

So, I need a way to end current session, unload application, then restart it again by just clicking on an OK button. This will cause app to re-read the INI file which will now have all cell entries (minus the one user deleted) in the correct index order.

Maybe I could just go back to Form_Load but not sure what it may cause.

Viewing all articles
Browse latest Browse all 21916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>