APIによる GetForegroundWindow と GetClientRect でいけそうだと、ぐぐってわかりましたが、
いざソースを組み上げて実行すると、XとYの位置ではなくクライアントサイズしか返ってきません。
現在お手上げ状態です><
とりあえずソースは次の通りですが、やはりクライアントサイズです><
どなたかわかる方居たら教えていただければうれしいです。
#uselib "user32.dll" #func global GetForegroundWindow "GetForegroundWindow" #func global GetClientRect "GetClientRect" sptr,sptr screen 0,800,200 repeat getkey a,1 //クリックでチェック if a=1 { color 1: boxf : color 0,255 GetForegroundWindow//アクティブウインドウのハンドル hnd=stat dim r, 4 GetClientRect hnd, varptr(r) pos 20,20 mes "ウインドウハンドル ="+hnd mes r(2) mes r(3) } wait 1 loop