누구나 왜 이것이 작동하지 않는지 알 수 있습니까?FindWindow 대 GetActiveWindow - 왜 differnt 핸들을 반환합니까?
IntPtr hWnd = FindWindow(null, "Calculator");
IntPtr hWnd2 = GetActiveWindow();
if(hWnd == hWnd2)
{
MessageBox.Show("Same");
}
를 불러옵니다은 다음과 같습니다
[DllImport("user32.dll")]
static extern IntPtr GetActiveWindow();
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
응용 프로그램을 실행할 때 활성 창을 계산기로 설정하는 방법은 무엇입니까? – scottm
나는 그것을 마우스로 클릭 할 것인가? 나는 대답을 추가해 냈다. –