Pronašao sam ovo na netu (jest za .net, ali prevest češ već :) ):
Code:
Private Sub CloseExplorer(ByVal strTitle As String)
Dim hWnd As IntPtr = FindWindowExW(IntPtr.Zero, IntPtr.Zero, "CabinetWClass", Nothing)
While Not hWnd.Equals(IntPtr.Zero)
Dim sb As New StringBuilder(255)
GetWindowTextW(hWnd, sb, 255)
If sb.ToString.ToLower.Contains(strTitle.ToLower) Then PostMessageW(hWnd, WM_CLOSE, 0, 0)
hWnd = FindWindowExW(IntPtr.Zero, hWnd, "CabinetWClass", Nothing)
End While
End Sub
CloseExplorer("My Special Documents") 'This is not case sensitive
Koristi ovo:
Code:
Imports System.Runtime.InteropServices
Imports System.Text
ne znam koja je referenca za vb u accessu (ako je uopće izvedivo na ovaj način).
F