upon hearing the news, players and coaches across
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();foreach (Process thisproc in Process.GetProcessesByName("MeetingClient"))//进程名
{
if (thisproc.MainWindowHandle.ToInt32() == GetForegroundWindow().ToInt32())
{
//当前为活动窗口时要执行的代码
}
}
Comments
Post a Comment