Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Option Button Changes 1

Status
Not open for further replies.

ZmrAbdulla

Technical User
Apr 22, 2003
4,364
0
0
AE
Hi,
I need to provide an option group to the user to select some options. Normally Option1 will be the default. But once the user changes the Option to another then app should remember it and keep the setting next time open it.
How this can be achieved?
Also is this possible with CheckBoxes? Once checked/unchecked then remember it next time open the app.
thanks

Zameer Abdulla
Visit Me
Where to pay your [purple]Tsunami[/purple] relief donations?
 
You need to save the settings to the registry (or an .ini).
Do a search for these registry statements/functions here or in/on MSDN.
SaveSetting
GetSetting
GetAllSettings
DeleteSetting
 
Thanks zarney,
I was thinking to create my app without any dependant file except system OCX or DLL. Now it is forcing me to do..
And I am totally new to manipulate ini file or registry.
I will have to learn if it is the only way.


Zameer Abdulla
Visit Me
Where to pay your [purple]Tsunami[/purple] relief donations?
 
Harleyquinn,
Actually I am creating an app for free distribution. I want to give user their own preferences for font and some other formatting options. App some thing like a text editor. So one can use Times New Roman and other can Verdana. I am not going to give all the system fonts, some selcted only. So a collection of choices will be given to them. Once they have changed the settings then it should remain to new until they change. I like to give options or checkboxes.
Any input that can be used inside the app will be greatly appreaciated.
..and I will be back tomorrow only. It is time to move
regards

Zameer Abdulla
Visit Me
Where to pay your [purple]Tsunami[/purple] relief donations?
 
Hi,

The way the app will work I would have to agree with zarney. the registry or an .ini file.

If you are totally new to the above I would probably go for the .ini file, or even a text file will do the job if you aren't confident on the other solutions.

When the user closes the app save the preferences (font etc) the the text file and read them into the app when it loads. Should be fairly simple.

If you do want to go the registry or .ini file route as zarney pointed out if you do a search on this site or Google it you will find loads of examples of how to work with them.

Hope this helps

Harleyquinn

---------------------------------
For tsunami relief donations
 
Registry is the way to go if you want to avoid extra files and extra complications. As Zarney said, do a search in this forum for SaveSetting and GetSetting

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

For tsunami relief donations

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top