加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
WinAPI.cs 928 Bytes
一键复制 编辑 原始数据 按行查看 历史
xujoe 提交于 2020-04-09 09:33 . 测试
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ReadTxT
{
public class WinAPI
{
[DllImport("user32.dll")]
public extern static IntPtr GetDesktopWindow();
[DllImport("user32.dll")]
public extern static bool SetLayeredWindowAttributes(IntPtr hwnd, uint crKey, byte bAlpha, uint dwFlags);
public static uint LWA_COLORKEY = 0x00000001;
public static uint LWA_ALPHA = 0x00000002;
[DllImport("user32.dll")]
public extern static uint SetWindowLong(IntPtr hwnd, int nIndex, uint dwNewLong);
[DllImport("user32.dll")]
public extern static uint GetWindowLong(IntPtr hwnd, int nIndex);
public enum WindowStyle : int { GWL_EXSTYLE = -20 }
public enum ExWindowStyle : uint { WS_EX_LAYERED = 0x00080000 }
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化