using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices; namespace 阴影
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果
} #region 窗体边框阴影效果变量申明
const int CS_DropSHADOW = 0x20000;
const int GCL_STYLE = (-);
//声明Win32 API
[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);
#endregion }
}

C#窗体四边框阴影效果的实现的更多相关文章

  1. C# 无边框窗体边框阴影效果

    通过下面代码在构造函数中调用方法 SetShadow(); 即可实现无边框窗体的阴影效果了 需要添加命名空间 using System.Runtime.InteropServices; private ...

  2. 好玩的WPF第一弹:窗口抖动+边框阴影效果+倒计时显示文字

    原文:好玩的WPF第一弹:窗口抖动+边框阴影效果+倒计时显示文字 版权声明:转载请联系本人,感谢配合!本站地址:http://blog.csdn.net/nomasp https://blog.csd ...

  3. c# 无边框窗体的边框阴影

    Windows API: using System; using System.Collections.Generic; using System.ComponentModel; using Syst ...

  4. WPF实用指南一:在WPF窗体的边框中添加搜索框和按钮

    原文:WPF实用指南一:在WPF窗体的边框中添加搜索框和按钮 在边框中加入一些元素,在应用程序的界面设计中,已经开始流行起来.特别是在浏览器(Crome,IE,Firefox,Opera)中都有应用. ...

  5. (转)教你实现Winform窗体的四边阴影效果

    1.首先我们得有这样一张阴影图片. 2.然后分别有两个窗体去实现这个阴影效果. SkinForm - 用于实现阴影的绘制,特性:鼠标可穿透,无法点击,跟随窗体. SkinMain - 主窗体,也是承载 ...

  6. Qt自定义窗体,边框,圆角窗体

    MainWindow::MainWindow(QWidget*parent): QMainWindow(parent), ui(new Ui::MainWindow) { setAttribute(Q ...

  7. CSS边框阴影效果

    ul { margin:5px 0 0 0; padding:0; list-style:none; width:300px; background:#f1f1f1; }li { border-lef ...

  8. css3边框阴影效果

    下面来说下css3阴影的语法: box-shadow:none | <shadow> [ , <shadow> ]* <shadow> = inset? & ...

  9. css3 边框阴影效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

随机推荐

  1. Python学习总结7:随机字符串和随机数

    Python生成随机数与随机字符串,需要import random模块.random模块最常用的几个函数如下: 1. random.random(a, b) 用于生成一个0到1的随机符点数: 0 &l ...

  2. SQL面向对象抽象类

    抽象类:抽象类,只为继承而出现,不定义具体的内容,只规定该有哪些东西:一般抽象类中只放置抽象方法,只规定了返回类型和参数:例: 人 - 有吃饭,睡觉方法: 男人 - 继承人抽象类,必须实现吃饭,睡觉的 ...

  3. extjs4.0下的日期控件的星期显示为y的解决办法

    没有修改的时候的问题: 今天第一次写博客,就记录一下以前extjs4.2下运用日期组件的星期显示问题,当时找了n久,可能是extjs4.2才出来没多久,没有多少人发现这个问题或者说很少有人将Extjs ...

  4. drds 广播表的创建以及使用

    创建表 , 关键词 : BROADCAST CREATE TABLE `financial_product_yjw` ( `ID` int(10) unsigned NOT NULL AUTO_INC ...

  5. 夺命雷公狗---Thinkphp----1之目录介绍

    ThinkPHP框架 特点: 免费开源 敏捷开发(快速开发) 面向对象 MVC思想 yii,ci之类的框架都有这些特点.是06年到现在的一个老牌框架,现在还是个很不错的框架 可以在thinkphp的官 ...

  6. [CrunchBang]禁止“桌面上鼠标滚轮切换工作区桌面“

    鼠标滚轮切换虚拟桌面相关问题, 编辑 ~/.config/openbox/rc.xml 在   <context name="Desktop">段: <mouse ...

  7. Origin双坐标轴图表

    1.空白处右键Add New Colume添加新列 2.全选各个列绘制图表 3.添加新的Y轴图层Graph—New Layer—Right-Y 4.右键左上角图层2 –Layer Contents 绑 ...

  8. Delphi中如何将 Exe 程序或其他资料打包在内,使用时再释放使用(转)

    1.生成一个rc文件,文件格式如下: rname exefile "test.exe" //rname是资源名称 //exefile是资源类型 //text.exe是资源 资源类型 ...

  9. ch2-4:遇到嵌套列表进行缩进打印

    1.增加一个参数来控制缩进打印:level '''这是一个模块,可以打印列表,其中可能包含嵌套列表''' def print_list(the_list,level): ""&qu ...

  10. 使用Perl5获取有道词典释义

    Get Word Definition from dict.youda.com via Perl Script 获取基本释义 Get Basic Definition http://dict.youd ...