关于C# WinForm 边框阴影窗体(一)
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 testWinForm
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果
}
#region 窗体边框阴影效果变量申明
const int CS_DropSHADOW = 0x20000;
const int GCL_STYLE = (-26);
//声明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
private void Form2_Load(object sender, EventArgs e)
{
}
}
}
关于C# WinForm 边框阴影窗体(一)的更多相关文章
- c# WinForm 边框阴影窗体
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- winform学习(9)无边框拖动窗体
去除边框 选中窗体,在属性中找到FormBorderStyle,设置为None 实现无边框拖动 [DllImport("user32.dll")] public st ...
- 【边框】-边框阴影-box-shadow
CSS3之box-shadow边框阴影 div{box-shadow: 10px 10px 5px #888888;} 来自为知笔记(Wiz)
- winform打开子窗体后,在子窗体中刷新父窗体,或者关闭子窗体刷新父窗体
winform打开子窗体后,在子窗体中刷新父窗体,或者关闭子窗体刷新父窗体,搜集了几个方法,列举如下: 一 . 所有权法 父窗体,名称为“fuForm”,在父窗体中有个公共刷新方法,也就是窗体数据初始 ...
- css边框阴影
<style type="text/css">.mydiv{width:250px;height:auto;border:#909090 1px solid;backg ...
- C# 无边框异型窗体制作
我是一个C#的初学者 只要涉及到windows窗体编程 都希望窗体的外观比较好看 不是系统默认的那样 对于C# 更改窗体外观感觉并不那么轻松 更改窗体外观涉及到使用GDI+ 我所知道的有两种方法: 有 ...
- Delphi实现无标题有边框的窗体
1.在delphi中新建窗体程序,然后设置窗口的 BorderStyle属性为bsNone 2.在窗体的public区写下这一句: Procedure CreateParams(var Params ...
- CSS 边框 阴影 效果
CSS 边框 阴影 效果 以下将css实现阴影效果,以便须要朋友们,直接上代码 #shadow1{ width: 200px; height: 100px; color: white; backgro ...
- CSS3 02. 边框、边框圆角、边框阴影、边框图片、渐变、线性渐变、径向渐变、背景、过渡transition、2D转换
边框圆角 border-radius 每个角可以设置两个值,x值.y值 border-top-left-radius:水平半径 垂直半径 border-radius:水平半径/垂直半径 border- ...
随机推荐
- W:Failed to fetch http://archive.ubuntukylin.com:10006/ubuntukylin/dists/pre
由于用ubuntu的时候装了几个ubuntukylin的软件(像搜狗拼音for linux),于是最近总是蹦出一个红色的三角提示,说无法更新,虽说不影响使用但是还是很不爽.解决方法记录如下: 进入系统 ...
- hdu 1866 几个矩形面积的和 ***
给出几个矩形,求出面积之和,相交区域只能算一次 一开始想用线段树求个并,后来发现没办法知道并了几次,然后就不会了 看了题解 本题其实很简单,但是想要想到转化也很不容易,因为本题是求面积之和,但是两个矩 ...
- NuGet学习笔记(2) 使用图形化界面打包自己的类库
上文NuGet学习笔记(1) 初识NuGet及快速安装使用说到NuGet相对于我们最重要的功能是能够搭建自己的NuGet服务器,实现公司内部类库的轻松共享更新.在安装好NuGet扩展后,我们已经能够通 ...
- Build better apps: Windows 10 by 10 development series
http://blogs.windows.com/buildingapps/2015/08/05/build-better-apps-windows-10-by-10-development-seri ...
- socket编程学习
socket: 也称作套接字,应用程序通常通过套接字向网络发出请求或者应答网络请求. 常用的套接字API函数: 1.socket(): 函数原型为:int socket(int domain, int ...
- MSComm32控件注册方法
两种方法去解决,一种方法是当我们安装VC++6.0/VB6.0时,如果选择了ACtiveX控件项(自定义安装),MSComm控件就会自动安装在计算机上了,并在系统文件夹下多了3个文件:Mscomm.s ...
- hibernate基础的CRUD的操作
保存记录 session.save(customer); 根据主键进行查询 Customer customer = (Customer)session.get(Customer.class ,1); ...
- 【转】Hive配置文件中配置项的含义详解(收藏版)
http://www.aboutyun.com/thread-7548-1-1.html 这里面列出了hive几乎所有的配置项,下面问题只是说出了几种配置项目的作用.更多内容,可以查看内容问题导读:1 ...
- jsp遍历、循环
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 1. <% Te ...
- git学习 git-flow
例子 初始化 在git init之后执行git init flow;接下来的命名约定建议使用默认值; 新特性 为即将发布的版本开发新功能特性. 这通常只存在开发者的库中. 增加新特性 git flow ...