forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Remembering Previous State

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Seffyroff
Newbie


Joined: 08 Apr 2002
Posts: 15

PostPosted: Tue Apr 09, 2002 4:40 pm    Post subject: Remembering Previous State Reply with quote

Is there any way I can have my program remember the previous states/selections of combo boxes, check boxes etc from the last time the program was run? Would it be done via an .ini file or some registry keys perhaps?
Back to top
View user's profile Send private message
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Tue Apr 09, 2002 5:05 pm    Post subject: Reply with quote

Answers:

1. Yes. Very Happy
2. Yes. Very Happy
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Apr 09, 2002 6:37 pm    Post subject: Reply with quote

There are a few ways to do this, and I'm sure everyone
has their own preferences. You can use INI files, the
registry, or a simple text file.

Heres' my opinion...

I don't like programs that mess with the registry unless
it's absolutely necessary, so I rarely (if ever) use this.

The INI file system is OK, but usually takes more code
to find and access a quantity of data, and can get flaky
with constant access.

I prefer a simple text file (named program.dat, etc.),
which can be loaded into a list at program startup. You
can use it similiar to an INI file with keys if you like, or
(as I prefer) have each value on a separate line so that
you always check @item(ListName, x) for the needed
value, and it's always in the same place. And if the user
makes modifications, a simple LIST SAVEFILE command
saves any changes.

BTW, it's a good idea to use the full path of a .DAT or .INI
file, such as @path(%0)program.dat.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Seffyroff
Newbie


Joined: 08 Apr 2002
Posts: 15

PostPosted: Tue Apr 09, 2002 7:41 pm    Post subject: Reply with quote

Mac,

Thanks very much for your reply. I'm well into my 3rd day of using VDS now, armed with little more than a rudimentary knowledge of batch files, and of course some excellent advice from you guys.

Seffyroff.
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Apr 10, 2002 12:45 am    Post subject: Reply with quote

Also check into many of the example source codes on this site, as I'm sure many of them use such methods as you seek.


-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group