.NET/Windows API for .NET
GetFocus - 현재 Focus에 있는 Form또는 Control의 handle값 반환
클리엘
2019. 8. 12. 11:29
728x90
GetFocus는 현재 Focus상태에 있는 Control이나 Form의 handle값을 반환하는 함수 입니다.
Declare Function GetFocus Lib "user32" Alias "GetFocus" () As Integer
▶VB.NET 선언
GetFocus()
▶VB.NET 호출
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern int GetFocus();
▶C# 선언
GetFocus()
▶C# 호출
참고로 이 함수는 Form이나 Control의 handle method의 반환값과 같습니다.
728x90