quote:
Originally posted by Mattike
According to the MSDN site and the Win32 API Constants, this should do it:
code:
var WindowPlacment = Interop.Allocate(48);
function _getPlacement(hWnd){
if (hWnd > 0){
Interop.Call('user32', 'GetWindowPlacement', hWnd, WindowPlacement);
Debug.Trace('> .showCmd : '+WindowPlacement.ReadDWORD(8));
if (WindowPlacement.ReadDWORD(8) == 3){
Debug.Trace(' > .showCmd : Maximized');
} else if (WindowPlacement.ReadDWORD(8) == 2){
Debug.Trace(' > .showCmd : Minimized');
} else if (WindowPlacement.ReadDWORD(8) == 1){
Debug.Trace(' > .showCmd : Opened');
} else if(WindowPlacement.ReadDWORD(8) == 6){
Debug.Trace(' > .showCmd : Opened');
}
} else {
Debug.Trace(' > .showCmd : Closed');
}
}
Don't work so...However the problem is not this...I can't retrive when it's minimized not when it's opened..to retrive if it's opened i can use findwindow api function