|
|
Sponsored Links
Sponsor 
|
Sponsor Advertisements help keep UGN Security Online.
Support UGN Security by Purchasing our Sponsors Products.
|
| Top |
|
|
|
#17840 - 07/30/03 09:01 AM
Re: need hlp with databases pls...
|
DollarDNS Owner
Registered: 03/04/02
Posts: 1273
Loc: 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.
|
|
Top
|
|
|
|
|
Registered: 11/17/07
Posts: 10
|
|
6884 Members
44 Forums
10925 Topics
45702 Posts
Max Online: 677 @ 06/30/07 10:06 PM
|
|
|
0 registered (),
9
Guests and
11
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|