Results 1 to 7 of 7

Thread: [RESOLVED] Begining VB6, Useful programs

Threaded View

  1. #4

    Thread Starter
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: [RESOLVED] Begining VB6, Useful programs

    Code:
    ' Saving data to the Registry
    '
    Private Sub Form_Load()
        Label1.Caption = "Registry: Save to, Load from Registry"
        Command1.Caption = "Save"
        Command2.Caption = "Load"
    End Sub
    
    Private Sub Command1_Click()
        ' Save to Registry
        ' VB and VBA Program Settings
        Call SaveSetting("Demo2007", "values", "text1", Text1.Text)
    End Sub
       
    Private Sub Command2_Click()
        ' Loading, retrieving data from "VB and VBA program Settings"
        Text2.Text = GetSetting("Demo2007", "values", "text1", "2007-1")
       ' if the value at "Demo2007" sub "values" sub "text1"
       ' Text2.Text equals the default value of "2007-1"
    End Sub
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width