by Jay Villaflor (2 Submissions)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 3rd December 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This is a simple program that will detect the username, date and time everytime a user logs in to his computer.
API Declarations
'this folder. In the form you need not create any componets just
'write the code.In form properties make -- Visible -False.
'Then create a exe of the project. Keep this exe in 'Startup' folder
'of your computer.It will work. Each time your computer is opened
'a log record will be kept in the 'log.fil' file.
'View this file using notepad or any word editor.
'--------------------------
'Place the following code under a Module
'--------------------------
Public Declare Function GetUserNameA Lib "advapi32.dll" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetUserName() As String
Dim UserName As String * 255
Call GetUserNameA(UserName, 255)
GetUserName = Left$(UserName, InStr(UserName, Chr$(0)) - 1)
End Function
' Log Storing
Open "C:\Log\log.fil" For Append As #1
Write #1, GetUserName & " - " & Format(Date, "mmmm dd, yyyy") & " - " & Format(Time, "hh:mm:ss AM/PM")
Close
End
End Sub
No comments have been posted about This is a simple program that will detect the username, date and time everytime a user logs in to h. Why not be the first to post a comment about This is a simple program that will detect the username, date and time everytime a user logs in to h.