Ответить на сообщение
Вернуться к теме
Вы отвечаете на сообщение:
ник: Дядя Федор Может так - здесь и комп и юзер (текст ест-но не мой,откуда не помню)
Option Compare Database Option Explicit Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function ComputerName() As String Dim strComputerName As String ' contains workstation name for the current workstation. strComputerName = Space(255) If GetComputerName(strComputerName, (Len(strComputerName) + 1)) Then strComputerName = Trim$(strComputerName) strComputerName = Left$(strComputerName, Len(strComputerName) - 1) ComputerName = strComputerName Else ComputerName = "ComputerNameError" End If ComputerName_Exit: Exit Function ComputerName_Err: MsgBox Err.Description End Function Function UserName() As String Dim strUserName As String ' contains Windows logon name for the current user On Error GoTo UserName_Err strUserName = Space(255) If GetUserName(strUserName, (Len(strUserName) + 1)) Then strUserName = Trim$(strUserName) strUserName = Left$(strUserName, Len(strUserName) - 1) UserName = strUserName Else UserName = "errorName" End If UserName_Exit: Exit Function UserName_Err: MsgBox Err.Description End Function
dim Tekpolz as string Tekpolz=Username
Ваше имя:
Пароль:
Сообщение:
Прикрепить:
Для вставки смайлов в текст щелкните по значку.