Article ID: 129852
Article Last Modified on 11/18/2003
GetCapture (VOID)
GetFocus (VOID)
ReleaseCapture (VOID)
SetActiveWindow (HWND)
SetCapture(HWND)
SetFocus (HWND)
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetWindowTextA Lib "user32" (ByVal hwnd _
As Long, ByVal lpString As String, ByVal aint As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Dim myhwnd As Long Dim s As String Dim iret As Long Dim nullhwnd As Long s = Space(256) myhwnd = GetActiveWindow() iret = GetWindowTextA(myhwnd, s, 256) Debug.Print myhwnd, s Shell "Calc.exe", 1 ' Wait for CALC.EXE to launch under Windows NT: DoEvents nullhwnd = GetActiveWindow() myhwnd = GetForegroundWindow() s = Space(256) iret = GetWindowTextA(nullhwnd, s, 256) Debug.Print nullhwnd, s s = Space(256) iret = GetWindowTextA(myhwnd, s, 256) Debug.Print myhwnd, s
Additional query words: 4.00 vb4win vb432
Keywords: kbwndw kbprb KB129852