.NET/Windows API for .NET
GetActiveWindow - 현재 프로그램의 윈도우 핸들값
클리엘
2019. 8. 12. 11:28
728x90
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Integer
▶VB.NET 선언
GetActiveWindow()
▶VB.NET 호출
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern int GetActiveWindow();
▶C# 선언
GetActiveWindow()
▶C# 호출
GetActiveWIndow는 현재 함수를 호출하고 있는 Program(Thread)과 관련된 Windows의 handle값을 반환합니다.
만일 관련된 Windows화면이 존재하지 않는 경우에는 null을 반환합니다.
728x90