Solved

retaining a variables value after the application has quit

Posted on 2009-04-03
3
233 Views
Last Modified: 2013-12-27
So I am developing an application for a Windows Mobile Device.  In visual studio it is a Pocket PC 2003 Project.  This application brings up the camera, and saves pictures as a filename that i have specified.  I want to number the images in the order they were taken, but the problem is, when a user quits the program the number variable that gets in the filename gets reset, is there a way for me to initialize this variable once and have it retain its value the next time the user starts the program so that the images are numbered in sequential order?
0
Comment
Question by:bquinn10
3 Comments
 
LVL 16

Expert Comment

by:CuteBug
ID: 24060515
Create a config file for the application and store the latest value of the variable when the application quits.

When the application is started, check if the config file exists:
If it does, retrieve the value and assign it to the variable.
If it does not, initialize the variable, create a new config file and store the value in the file.
0
 

Author Comment

by:bquinn10
ID: 24060528
ok that sounds easy enough but how do u create a config file? is it just a text file?
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 24060848
Yes...a "config" file is just a text file with the data formatted in it however you choose.

Another option is to query the system and look at all the existing files that match your pattern...and then determine the next available number based on what is already present on the system.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question