Visual Basic (VB) is an event driven programming language and associated development environment prototyped by Alan Cooper as Project Ruby, then bought and vastly improved upon by Microsoft. VB has been replaced by Visual Basic .NET. The older version of VB was derived heavily from BASIC and enables rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of ActiveX controls and objects.
2006-07-03 20:23:37
·
answer #1
·
answered by Anonymous
·
0⤊
1⤋
The api call
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public OK As Boolean
Private Sub Form_Load()
Dim sBuffer As String
Dim lSize As Long
LoadInit
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetComputerName(sBuffer, lSize)
If lSize > 0 Then
Text1.Text = Left$(sBuffer, lSize)
Else
Text1.Text = vbNullString
End If
Call GetUserName(sBuffer, lSize)
If lSize > 0 Then
tUser.Text = Left$(sBuffer, lSize)
Else
tUser.Text = vbNullString
End If
End Sub
Ignore the getUserName call, but this the beginning of my login routine.
I just added the GetComputerName to test it and it worked fine.
2006-06-28 20:35:18
·
answer #2
·
answered by 6
·
0⤊
0⤋
are you serious? all you have to do is just ask me for a date silly! cut out all the gibber dash what not lol.
2006-07-03 22:37:33
·
answer #3
·
answered by joan of arc 2
·
0⤊
0⤋