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');
}
}