Settings in VB6 App Using Registry |
Author: |
Message: |
Salem
Senior Member
Posts: 769 Reputation: 16
37 / /
Joined: May 2004
|
O.P. Settings in VB6 App Using Registry
Can anyone help me.
I wanna add a "Settings" feature to a VB app of mine. But would like the settings to be stored in the system registry? How can i rite data to and read data from the registry in Visual Basic 6? I have no idea of how to do this so if you could provide me with the required module(s) it'll be great.
Please
Thanks in advance, i know someone on these forums will be able to help me.
RileyM
Was i Helpful?[/url]
|
|
09-07-2005 04:49 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: Settings in VB6 App Using Registry
|
|
09-07-2005 04:53 PM |
|
|
Stigmata
Veteran Member
Posts: 3520 Reputation: 45
21 / /
Joined: Jul 2003
|
RE: Settings in VB6 App Using Registry
|
|
09-07-2005 04:55 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Settings in VB6 App Using Registry
use can use code: GetSetting ( AppName As String,Section As String,Key As String, [Default]) As String
and code: SaveSetting ( AppName As String,Section As String) As String
|
|
09-07-2005 04:56 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
RE: Settings in VB6 App Using Registry
But with those you don't really have much control.
If you want more control, use RegOpenKey(), RegCreateKey(), RegQueryValueEx(), RegSetValueEx(), and RegCloseKey().
|
|
09-07-2005 05:19 PM |
|
|
Salem
Senior Member
Posts: 769 Reputation: 16
37 / /
Joined: May 2004
|
O.P. RE: RE: Settings in VB6 App Using Registry
quote: Originally posted by Dempsey
use can use code: GetSetting ( AppName As String,Section As String,Key As String, [Default]) As String
and code: SaveSetting ( AppName As String,Section As String) As String
Wouldn't i need to declare anything if using this method?
quote: Originally posted by raceprouk
But with those you don't really have much control.
If you want more control, use RegOpenKey(), RegCreateKey(), RegQueryValueEx(), RegSetValueEx(), and RegCloseKey().
What functionality do these ones provide that Dempsey's don't. I just want very basics for now.
This post was edited on 09-08-2005 at 04:08 PM by Salem.
Was i Helpful?[/url]
|
|
09-07-2005 05:40 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Settings in VB6 App Using Registry
GetSetting and SaveSetting are ideal for basic saving and retrieving of user options. ANd you don't need to decalre anything as they are built-in VB commands.
|
|
09-07-2005 05:45 PM |
|
|
Salem
Senior Member
Posts: 769 Reputation: 16
37 / /
Joined: May 2004
|
O.P. RE: RE: Settings in VB6 App Using Registry
quote: Originally posted by Dempsey
GetSetting and SaveSetting are ideal for basic saving and retrieving of user options. ANd you don't need to decalre anything as they are built-in VB commands.
Oh thanks, that seems good enough for me. Can you give me a code example on how they are used.
Sorry, if im askin alot. I just can't find anything online, and this is the first time im trying it.
RileyM
Was i Helpful?[/url]
|
|
09-07-2005 06:17 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Settings in VB6 App Using Registry
code: SaveSetting ("MyAppName", "MySettingName", "MySettingValue")
GetSetting ("MyAppName", "MySettingName")
|
|
09-07-2005 07:23 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
RE: Settings in VB6 App Using Registry
If you want help with the Reg*() functions, don't hesitate to ask. They're not hard to use once you get used to them
For now though, Get/SaveSetting will do you fine
|
|
09-07-2005 07:34 PM |
|
|
Pages: (3):
« First
[ 1 ]
2
3
»
Last »
|
|