• C# 无边框窗体边框阴影效果的简单实现


    private const int CS_DropSHADOW = 0x20000;         private const int GCL_STYLE = (-26);                   [DllImport("user32.dll", CharSet = CharSet.Auto)]         public static extern int SetClassLong(IntPtr hwnd, int nIndex, int dwNewLong);         [DllImport("user32.dll", CharSet = CharSet.Auto)]         public static extern int GetClassLong(IntPtr hwnd, int nIndex);   

            private void SetShadow()         {             SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DropSHADOW);         }  

    需要添加命名空间 using System.Runtime.InteropServices;

    通过下面代码在构造函数中调用方法 SetShadow();

  • 相关阅读:
    C# 数组
    一个遍历算法
    php csv导出
    linux 配置 crontab
    LINUX 配置SVN
    Linux chkconfig命令
    Linux 安装mysql+apache+php
    linux 安装samba
    linux安装软件的学习
    LINUX中简单的字符命令
  • 原文地址:https://www.cnblogs.com/FLWL/p/4013172.html
Copyright © 2020-2023  润新知