hi! i want to know that if my vb application is running i.e. the exe and suppose in between that if power goes off and the computer gets switched off. when power comes and we switch on the computer then that exe should run from the same point where it has stopped earier during power off.
power off while running exe
Collapse
X
-
I think that would depend upon what the application was doing...
If you're processing data then you could put in a marker about which record you have reached on a query unload event and then when the program starts back up it looks for that marker, if you're not handling data then im not sure how, i'd need to see what you app is doing to carry on with. -
Originally posted by skadu3hi! i want to know that if my vb application is running i.e. the exe and suppose in between that if power goes off and the computer gets switched off. when power comes and we switch on the computer then that exe should run from the same point where it has stopped earier during power off.
This is on the type of your app.
There are two solutions
1) As said below use marker
2) Use a configuration file in which after every second or after soome time all of your work or your working state will copied and when the power turns off and on you can load settings from that file it can be a txt file or a database.
Now tell which solution you choose.
I can made an example for you.
GOODLUCKComment
-
Originally posted by skadu3hi thanks for your reply.
as i don't know how to use a marker, can you please send me the examples of both the solutions.
WAITING FOR YOUR REPLY!!!!
But i too not know about marker i can only make of copying the text to a file.
But let me know the app you are building is a database or any other.
If not then you use FSO system for this purpose on a timer control. Which saves all the data in the textboxes, state of checkboxes and other controls in a txt or any other file.
Let you set 1 second to timer then timer save all the state to the txt file after every 1 second
You can tell by marker to the person who give the idea.
I m SORRY buddy
GOODLUCK
ALIComment
Comment