I am using the GetActiveWindow() API but it returns 0
I have a remote that I activate this code with:
Code:
WinAmpHandler = GetActiveWindow
WinAMPhWnd = FindWindow("Winamp v1.x", vbNullString)
I have the WinAmp window active but the GetActiveWindow returns a 0 instead
of the window handler, way?
I am using this WinAMPhWnd = FindWindow("Winamp v1.x", vbNullString) to se
the correct WinAmp hWnd, it works fine.
I want to get the handler for the active window and use it to quit the
active program:
Code:
Public Const WM_QUIT = &H12
PostMessage(hWndHandler, WM_QUIT, 0&, 0&)
It work if i use WinAMPhWnd to quite WinAmp, but I want it to work on all
active programs...
If there is another bather way of quitting a active program than please tell
me :-)
Yours, Jonas