win32api.cs

来自「基于C/S的医疗卫生管理系统」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Qeb.Support.Common
{
    public class Win32Api
    {
        public const Int32 AW_HOR_POSITIVE = 0x00000001;
        public const Int32 AW_HOR_NEGATIVE = 0x00000002;
        public const Int32 AW_VER_POSITIVE = 0x00000004;
        public const Int32 AW_VER_NEGATIVE = 0x00000008;
        public const Int32 AW_CENTER = 0x00000010;
        public const Int32 AW_HIDE = 0x00010000;
        public const Int32 AW_ACTIVATE = 0x00020000;
        public const Int32 AW_SLIDE = 0x00040000;
        public const Int32 AW_BLEND = 0x00080000;
        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        public static extern bool AnimateWindow(
        IntPtr hwnd,  //  handle  to  window    
        int dwTime,  //  duration  of  animation    
        int dwFlags //  animation  type   
            );

        #region 输入法
        public const int IME_THotKey_IME_NonIME_Toggle = 16;
        [DllImport("imm32.dll")]
        public static extern bool ImmSetOpenStatus(IntPtr himc, bool b);
        [DllImport("imm32.dll")]
        public static extern bool ImmIsIME(IntPtr hKL);
        [DllImport("imm32.dll")]
        public static extern bool ImmSimulateHotKey(IntPtr hWnd, int dwHotKeyID);
        [DllImport("user32.dll")]
        public static extern IntPtr GetKeyboardLayout(int dwLayout);
        #endregion
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?