-6

プロセスオブジェクトがフォーカスされていることを確認する方法は? c++ od c# コードで返信してください よろしくお願いします。

4

1 に答える 1

2

GetForegroundWindow() に基づいてこのコードを使用できます

var process = GetForegroundWindow();
if (process != IntPtr.Zero) {
    return true;       // he has focus
}
于 2012-09-03T18:09:24.270 に答える