1.无边框窗体阴影,win7(需要开启Aero效果)及以上系统 public class LdwmForm : Form { public LdwmForm() { Initialize(); } /// <summary> /// 界面加载 /// </summary> /// <param name="e"></param> protected override void OnLoad(EventArgs e) { dwmInitia…
刚用到这个功能,网上扯淡的东西太多了,都是2边阴影,还什么窗口叠加.ps作图啥的,什么玩意.还是老外实在,google找的,无边框窗体,四边透明阴影. public partial class Form1 : Form { [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] private static extern IntPtr CreateRoundRectRgn ( int nLeftRect…
自己给软件做的皮肤,将窗体设为无边框后,想要其具有正常窗体的移动和改变大小功能,以下代 码可以实现.... //需添加using System.Runtime.InteropServices; [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntP…
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WinGPChat.master { public…
前言 在之前的博客<如何在pyqt中通过调用SetWindowCompositionAttribute实现Win10亚克力效果>中,我们实现了窗口的亚克力效果,同时也用SetWindowCompositionAttribute() 给亚克力窗口加上了阴影.但是更多时候我们用不到亚克力效果,但又需要给无边框窗口加上阴影.一种方法是在当前窗口外嵌套一层窗口,然后用 QGraphicsDropShadowEffect 给里面的窗口加上阴影,还有一种就是重写 paintEvent()来绘制阴影.下面来…
无边框窗体移动: //窗体移动API [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int IParam); public const int WM_SYSCOMMAND = 0…
弹框 MessageBox.Show(); 清空 clear() 字符串拼接 string 公共控件 button 按钮 checkbox 复选框 checklistbox 多个复选框 combobox 可以编辑的文本框 datatimepicker  日期控件 label 文字 linklabel 像超链接的文字 notifyicon 在小任务栏里显示本窗口图标 textbox 允许用户输入文本 picturebox 图片框 radiobotton 单选框 combobox 下拉菜单 容器 p…
//窗体移动API [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int IParam); public const int WM_SYSCOMMAND = 0x0112; pu…
//窗体移动API[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport("user32.dll")]public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int IParam);public const int WM_SYSCOMMAND = 0x0112;public c…
一.无边框窗体 1.控制按钮如何制作就是放置可以点击的控件,不局限于使用按钮或是什么别的,只要放置的控件可以点击能触发点击事件就可以了 做的好看一点,就是鼠标移入(pictureBox1_MouseEnter),移出(pictureBox1_MouseLeave),按下( pictureBox1_MouseDown)三个事件会让按钮改变样式 如何获取图片的相对路径:Application.StartupPath + "\\..\\..\\images\\btn_close_highlight.p…