What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Settings in VB6 App Using Registry

Pages: (3): « First [ 1 ] 2 3 » Last »
Settings in VB6 App Using Registry
Author: Message:
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
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
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
09-07-2005 04:49 PM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Settings in VB6 App Using Registry
http://www.mentalis.org/apilist/r.shtml

all the stuff beginning with Reg
09-07-2005 04:53 PM
Profile PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
20 / Other / Flag
Joined: Jul 2003
RE: Settings in VB6 App Using Registry
use a registry module...

some here:

http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=10479&lngWId=1
http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=36374&lngWId=1


Or generally :
http://pscode.com/vb/scripts/BrowseCategoryOrSear...fEntriesPerPage=10
09-07-2005 04:55 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
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

SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
09-07-2005 04:56 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
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().
[Image: spartaafk.png]
09-07-2005 05:19 PM
Profile PM Web Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
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.
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
09-07-2005 05:40 PM
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
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.
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
09-07-2005 05:45 PM
Profile E-Mail PM Web Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
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
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
09-07-2005 06:17 PM
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: Settings in VB6 App Using Registry
code:
SaveSetting ("MyAppName", "MySettingName", "MySettingValue")


GetSetting ("MyAppName", "MySettingName")


SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
09-07-2005 07:23 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
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 ;)
[Image: spartaafk.png]
09-07-2005 07:34 PM
Profile PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On