VB Code:
Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As IntPtr) As IntPtr Private Declare Function GetMainWindow Lib "user32" (ByVal hwnd As IntPtr) As IntPtr Public Sub SelectWindow(ByVal Process_hWnd As IntPtr) 'Bring target window to front BringWindowToTop(GetMainWindow(Process_hWnd)) End Sub
why isn't this working?
called by:
VB Code:
hWndIntPtr = SOMEPROCESS.Handle [COLOR=Red]'EDITED:SelectWindow(New IntPtr(hWndIntPtr.ToInt64))[/COLOR] 'To this: SelectWindow(hWndIntPtr) 'DUH! :)
EDIT:
ok, a little more info...
Error number: 453 "Unable to find entry point named GetMainWindow in DLL user32"...![]()





Reply With Quote