Assign a value to a variable permanently during initial run

Please discuss general Delphi programming topics here.

Assign a value to a variable permanently during initial run

Postby sekar1 » April 6th, 2009, 8:24 am

Hi,

I am developing an application for file processing using delphi. Is it possible to assign a value for a variable permanently after closing the application also?

Here is the description of the problem.

When the Delphi exe runs first time in any (New) machine, it needs user to input some variables and store it inside the application. When the users close and reopen the application, the already input variables should remain the same (with already input value) and user need not input the value to the variable once again.
If any possibilities are there, please let me know.
At present I am providing input values each time I run the exe (used the input box in the form create event). I want to avoid that.

Thanks,
Sekar
sekar1
Junior Member
Junior Member
 
Posts: 25
Joined: December 21st, 2006, 5:55 am

Re: Assign a value to a variable permanently during initial run

Postby Kambiz » April 6th, 2009, 11:07 am

Use the Windows Registry for saving/retrieving your values.

See TRegistry class for more information.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Assign a value to a variable permanently during initial run

Postby geowink » April 7th, 2009, 6:46 pm

I would use an INI file. You can find how to use that in Help or ask here if you have problems.

George
George
geowink
Junior Member
Junior Member
 
Posts: 37
Joined: November 29th, 2005, 3:59 am
Location: La Grange, Illinois


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron