惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
L
LINUX DO - 最新话题
云风的 BLOG
云风的 BLOG
Know Your Adversary
Know Your Adversary
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
V
V2EX
The Hacker News
The Hacker News
P
Palo Alto Networks Blog
D
DataBreaches.Net
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
AWS News Blog
AWS News Blog
Forbes - Security
Forbes - Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
J
Java Code Geeks
美团技术团队
C
Cybersecurity and Infrastructure Security Agency CISA
Project Zero
Project Zero
Recorded Future
Recorded Future
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
L
LINUX DO - 热门话题
W
WeLiveSecurity
V
Visual Studio Blog
Schneier on Security
Schneier on Security
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
aimingoo的专栏
aimingoo的专栏
V2EX - 技术
V2EX - 技术
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
博客园_首页
I
InfoQ
Spread Privacy
Spread Privacy
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LangChain Blog
月光博客
月光博客
I
Intezer
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
Arctic Wolf
S
SegmentFault 最新的问题
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
The Exploit Database - CXSecurity.com
Google DeepMind News
Google DeepMind News

博客园 - 星期六

C# winform授权:获取cpu和硬盘的序列号,得到机器码 批量替换文本文件中的字符 获取主板及硬盘序列号 - 星期六 - 博客园 .net安装部署“Error 1001 在初始化安装时发生异常” 的解决方法 解决.net绘制的 WinForm 在 windows7下变形的方法。 如何使用 Visual C# 加密和解密文件 ppc通过蓝牙与电脑同步时无ActiveSync服务的解决方法。 winfrom中的几个界面皮肤控件 如何弹出一个模式窗口来显示进度条 如何在安装后自动运行程序? 调试自定义操作/安装程序类的方法 利用TimerCallback实现timer传递参数 网页中下载灰鸽子病毒的 SCRIPT 一段控制对象透明度的style. ASP.net 把 DataGrid 数据导出到 Excel . 用C#实现语音技术 ASP.NET 用读取二进制代码的方法在页面上显示指定图片。 c# 8条语句实现屏幕抓图 几条SQLl查询语句
.net 实现移动控件位置
星期六 · 2008-04-25 · via 博客园 - 星期六

   public partial class Form2 : Form
    
{
        
public Form2()
        
{
            InitializeComponent();
        }

        
private Point mouse_offset;
        
private void Form2_Load(object sender, EventArgs e)
        
{
        }

        
private void button1_MouseDown(object sender, MouseEventArgs e)
        
{
            mouse_offset 
= new Point(-e.X, -e.Y);//
        }

        
private void button1_MouseMove(object sender, MouseEventArgs e)
        
{
            ((Control)sender).Cursor 
= Cursors.Arrow;//设置拖动时鼠标箭头
            if (e.Button == MouseButtons.Left)
            
{
                Point mousePos 
= Control.MousePosition;
                mousePos.Offset(mouse_offset.X, mouse_offset.Y);
//设置偏移
                ((Control)sender).Location = ((Control)sender).Parent.PointToClient(mousePos);
            }

        }

    }