클리엘
CLIEL LAB
클리엘
전체 방문자
오늘
어제
  • 분류 전체보기 (514) N
    • Mobile (47)
      • Kotlin (47)
    • Web (84)
      • NestJS (9)
      • HTML5 & CSS3 (38)
      • Javascript (20)
      • TypeScript (6)
      • JQuery (11)
    • .NET (301) N
      • C# (84) N
      • ASP.NET (67)
      • Windows API for .NET (128)
    • Server (53)
      • SQL Server (10)
      • MariaDB (18)
      • Windows Server (6)
      • node.js (19)
    • System (12)
      • 작업LOG (12)
    • Review (11)
    • ETC (6)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

  • 블로그 정리

인기 글

태그

  • exception
  • .NET
  • c#
  • Entity Framework
  • HTML5
  • 변수
  • android studio
  • node.js
  • CSS3
  • asp.net core
  • LINQ
  • asp.net core web api
  • jQuery
  • Windows API
  • Kotlin
  • ASP.NET
  • android
  • JavaScript
  • NestJS
  • MariaDB

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
클리엘

CLIEL LAB

ActivateKeyboardLayout - Keyboard 언어별 선택함수
.NET/Windows API for .NET

ActivateKeyboardLayout - Keyboard 언어별 선택함수

2019. 8. 12. 11:26
728x90

Windows OS에 다음과 같이 Keyboard가 언어별로 설정되어 있을때


ActivateKeyboardLayout 함수는 Keyboard설정중 하나를 선택할 수 있도록 합니다.

Declare Function ActivateKeyboardLayout Lib "user32" Alias "ActivateKeyboardLayout" (ByVal HKL As Integer, ByVal flag As Integer) As Integer

▶VB.NET 선언

Private Const HKL_NEXT As Integer = 0
Private Const HKL_PREV As Integer = 1

ActivateKeyboardLayout(HKL_NEXT, 8)

▶VB.NET 호출

[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern int ActivateKeyboardLayout(int HKL, int flag);

▶C# 선언

private const int HKL_NEXT = 0;
private const int HKL_PREV = 0;

ActivateKeyboardLayout(HKL_NEXT, 8)

▶C# 호출


ActivateKeyboardLayout 함수에서 첫번째로 0과 1이 전달되는데 0은 다음차례에 속하는 Keyboard설정을 1은 현재 선택된 설정의 이전에 있는 설정을 선택하도록 합니다.

두번째 인수에서 8은 ActivateKeyboardLayout 함수로 선택된 Keyboard언어설정을 처음순서로 바뀌도록 합니다.

728x90
저작자표시 비영리 변경금지 (새창열림)

'.NET > Windows API for .NET' 카테고리의 다른 글

GetFocus - 현재 Focus에 있는 Form또는 Control의 handle값 반환  (0) 2019.08.12
GetActiveWindow - 현재 프로그램의 윈도우 핸들값  (0) 2019.08.12
CopyMemory - Memory 복사  (0) 2019.08.12
SystemParameterInfo - Windows System 환경설정  (0) 2019.08.12
SetComputerName - Computer Network 이름 바꾸기  (0) 2019.08.09
    '.NET/Windows API for .NET' 카테고리의 다른 글
    • GetFocus - 현재 Focus에 있는 Form또는 Control의 handle값 반환
    • GetActiveWindow - 현재 프로그램의 윈도우 핸들값
    • CopyMemory - Memory 복사
    • SystemParameterInfo - Windows System 환경설정
    클리엘
    클리엘
    누구냐 넌?

    티스토리툴바