当前位置:编程学习 > C#/ASP.NET >>

C# 窗口透明

using System; 

using System.Collections.Generic; 
using System.Text; 
using System.Runtime.InteropServices; 
  
namespace TransForm 
    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 
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,