728x90
반응형
728x170
■ SetForegroundWindow API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
using System;
using System.Runtime.InteropServices;
#region 전경 윈도우 설정하기 - SetForegroundWindow(windowHandle)
/// <summary>
/// 전경 윈도우 설정하기
/// </summary>
/// <param name="windowHandle">윈도우 핸들</param>
/// <returns>처리 결과</returns>
[DllImport("user32", SetLastError = true)]
private static extern bool SetForegroundWindow(IntPtr windowHandle);
#endregion
728x90
반응형
그리드형(광고전용)
'C# > WIN32' 카테고리의 다른 글
[C#/WIN32] GetWindowDC API 함수 선언하기 (0) | 2021.10.05 |
---|---|
[C#/WIN32] GetClientRect API 함수 선언하기 (0) | 2021.10.05 |
[C#/WIN32] EnableWindow API 함수 선언하기 (0) | 2021.10.05 |
[C#/WIN32] GetKeyboardLayoutName API 함수 선언하기 (0) | 2021.10.05 |
[C#/WIN32] GetKeyboardState API 함수 선언하기 (0) | 2021.09.15 |
[C#/WIN32] DeviceIoControl API 함수 선언하기 (0) | 2021.08.28 |
[C#/WIN32] LoadCursorFromFile API 함수 선언하기 (0) | 2021.08.28 |
[C#/WIN32] keybd_event API 함수 선언하기 (0) | 2021.08.28 |
[C#/WIN32] GetSystemMetrics API 함수 선언하기 (0) | 2021.08.28 |
[C#/WIN32] SetWindowPos API 함수 선언하기 (0) | 2021.08.28 |
댓글을 달아 주세요