非标题栏下,鼠标移动窗体(C#)
来源:互联网 发布:大数据分析要学什么 编辑:程序博客网 时间:2024/05/16 11:09
笔记如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;//必须添加
namespace WindowsApplication24
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;//必须添加
namespace WindowsApplication24
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
}
}
}
- 非标题栏下,鼠标移动窗体(C#)
- 无标题栏窗体移动
- [JAVA]③取消窗体标题栏和无边框效果,可鼠标移动窗体
- 非标题栏窗体拖动问题
- winform无标题栏移动窗体
- QT无标题栏窗体移动
- QT无标题栏移动窗体
- Qt 在自定义标题栏长按鼠标左键来实现窗体移动
- 自定义标题栏随鼠标移动
- Winform 没有FormBorder的情况下 支持鼠标移动窗体
- MFC对话框禁止移动 使标题栏不响应鼠标消息 通过客户区移动窗体 OnNcHitTest()的实现
- Winfrom窗体在去掉窗体边框的情况下使鼠标移动窗体
- C#无标题栏窗体鼠标拖动
- 设置鼠标可以移动窗体
- 简单的鼠标移动窗体
- 窗体上鼠标移动画线
- duilib 鼠标点击窗体移动
- 【C#】[窗体]窗体无标题栏拖动
- Eclipse / MyEclipse 快捷键总结
- 大型高并发高负载网站的系统架构
- 怎样在Mysql中直接储存图片
- 按日期对文件进行自动归档
- 编写函数,检查给定字符串是否整数,如果是,返回其整数值
- 非标题栏下,鼠标移动窗体(C#)
- JAVA大学实用教程实验指导4.2.1答案
- 在字符串中找出连续最长的数字串并以参数形式返回,并把这个串的长度返回
- 测试三剑客Quality Center Starter9.x,LoadRunner9.x,QuickTestPro9.x 破解
- 真高兴啊。。。。实际的为开源事业做了点点贡献:),很久前指出的一个lua stdlib的bug得到确认
- about:blank about:internets
- 优秀论文的要素
- 卡巴的中国式营销
- 六类网线、五类网线混合组网利用普通HUB