Kullanıcı Adı Al
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
'-----------------------------------------------
'MSN Listele
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Const LB_DIR = &H18D
Private Const DDL_DIRECTORY = &H10
Private Const DDL_ARCHIVE = &H20
Private Const DDL_EXCLUSIVE = &H8000
'----------------------------------------------
Private Sub Form_Load()
username
msnlistd
End Sub
Sub username() 'Kullanıcı Adını Göstermek İçIn
On Error Resume Next
Dim ret As Long
Dim c_name As String * 255
Dim u_name As String * 255
ret = GetUserName(u_name, Len(u_name))
If ret = 1 Then
lbluser.Caption = u_name
End If
End Sub
Sub msnlistd() 'MSN Listelemek İçIn
On Error Resume Next
SendMessage List1.hwnd, LB_DIR, DDL_EXCLUSIVE Or DDL_DIRECTORY, ByVal "C:/Documents And Settings/" & lbluser.Caption & "/Local Settings/Application Data/Microsoft/Messenger/*.*"
List1.RemoveItem 0
End Sub
KADİR SELEN