#17840 - 07/30/03 01:01 PM
Re: need hlp with databases pls...
|
Joined: Mar 2002
Posts: 1,273
SilentRage
DollarDNS Owner
|
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
|
You know what? Screw it. Let's go the INI file route cause it's easier. Add the following 2 lines to the top of your form code:
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Sub Form_Load() SaveUser "John", "Doe" MsgBox GetPass("John") End Sub
Use the following 2 routines
Private Sub SaveUser(User As String, Pass As String) WritePrivateProfileString "userlist", User, Pass, App.Path & "\users.ini" End Sub
Private Function GetPass(User As String) As String Dim Pass As String * 255, PassLength As Long PassLength = GetPrivateProfileString("userlist", User, "", Pass, 255, App.Path & "\users.ini") If PassLength > 0 Then GetPass = Left(Pass, PassLength) End Function
Tell me if you can't figure out how to use this. The code above is all you need to know to save/load user information. Then comes the encoding.
|
|
|
|
Forums41
Topics33,701
Posts68,795
Average Daily Posts0
|
Members2,173
Most Online1,567 Apr 25th, 2010
|
|
|
Okay WTF?
by HenryMiring on 09/27/17 08:45 AM
|
|
|
|
|
|
|
|