' Get the value.
Private Sub cmdGet_Click()
Dim buf As String * 256
Dim length As Long
length = GetPrivateProfileString( _
txtApplication.Text, txtKey.Text, "<no value>", _
buf, Len(buf), txtFilename.Text)
txtValue.Text = Left$(buf, length)
End Sub
' Set the value.
Private Sub cmdSet_Click()
WritePrivateProfileString _
txtApplication.Text, txtKey.Text, _
txtValue.Text, txtFilename.Text
txtValue.Text = "Ok"
End Sub
|