سلام به همه دوستان :smilingsmiley: این کد ادرس مسیر جاری رو پیدا میکنه (مسیری که کاربر توش هست)

Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Const WM_GETTEXT = &HD
Dim Address As String

Private Sub Form_Load()

End Sub

Private Sub Timer1_Timer()
    On Error Resume Next
    Dim Hwnd As Long
    Dim i As Integer
    Hwnd = FindWindow("CabinetWClass", vbNullString)
    If Hwnd <> 0 Then
        Hwnd = FindWindowEx(Hwnd, 0, "WorkerW", vbNullString)
        Hwnd = FindWindowEx(Hwnd, 0, "ReBarWindow32", vbNullString)
        Hwnd = FindWindowEx(Hwnd, 0, "ComboBoxEx32", vbNullString)
        Dim r As Long
        Dim s As String
        s = String(201, Chr(0))
        r = SendMessageByString(Hwnd, WM_GETTEXT, 200, s)
        If Left(s, r) = "My Computer" Then Exit Sub
        Address = Left(s, r)
    End If
    Text1.Text = Address
End Sub

امیدوارم مفید باشه :blushsmiley: