|
-
Nov 6th, 1999, 10:11 AM
#1
Thread Starter
Addicted Member
how to i set a button to save what a text box says, and set a second button to display what was saved into the registry when the save button was pressed. I played around with the settings for a while and still cant understand....thanks
-
Nov 6th, 1999, 10:29 AM
#2
For this example I'm using the VB functions SaveSetting and GetSetting, the same rules would apply if you were using the APIs:
On a Form with a Textbox and 2 Command Buttons..
Code:
Private Sub Command1_Click()
'Save the Text to the Registry
SaveSetting App.Title, "Test", "SavedText", Text1
End Sub
Private Sub Command2_Click()
'Retrieve the Text from the Registry
'Use "Nothing Saved." As a Default Value
'If nothing is in the Registry.
Text1 = GetSetting(App.Title, "Test", "SavedText", "Nothing Saved.")
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 6th, 1999, 01:52 PM
#3
Member
The problem with SaveSetting and GetSetting is that your application data is stored in a few VB subkeys, which is bad. You need to use SaveSetting[String/Long/DWord] and GetSetting[String/Long/DWord] to have complete control over the entire registry.
------------------
(¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
Teenage Programmer
Visual Basic, HTML, C++, JavaScript
http://welcome.to/X12Tech
Email: [email protected]
ICQ#: 9872708
-
Nov 7th, 1999, 12:09 PM
#4
Hyperactive Member
Take a look at this article on this site: http://www.vb-world.net/registry/registry2/
It has what you need.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|