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

推荐订阅源

T
Threat Research - Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
P
Proofpoint News Feed
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
A
About on SuperTechFans
T
Tenable Blog
M
MIT News - Artificial intelligence
IT之家
IT之家
I
Intezer
D
DataBreaches.Net
爱范儿
爱范儿
T
Threatpost
C
CERT Recently Published Vulnerability Notes
云风的 BLOG
云风的 BLOG
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
K
Kaspersky official blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
Cyberwarzone
Cyberwarzone
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AWS News Blog
AWS News Blog
博客园 - 聂微东
C
Check Point Blog
S
Securelist
有赞技术团队
有赞技术团队
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
D
Docker
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
L
Lohrmann on Cybersecurity
G
Google Developers Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog

博客园 - 萝卜青菜

.Net2.0在程序中编译代码 - 萝卜青菜 - 博客园 C#利用VB的My功能来显示文件拷贝、删除、移动进度 - 萝卜青菜 - 博客园 .net2.0提供的TextBox候选文字提示功能 .net2.0轻松判断NumLock、CapsLock、ScrollLock、Insert键的状态:) .net2.0轻松取得应用程序图标 利用System.Media来做声音提醒 .net2.0窗体关闭时自动保存窗体位置及大小 .net2.0中改变数组大小 将窗体或窗体上某控件保存为图片 ClickOnce部分信任文件达到一定大小怎么办?(技巧) 页面根据不同Url显示不同Title以及不同的Mete 新增的Application.OpenForms属性 全屏显示一个图片文件 使用静态类来简化单件 新的两道面试题(简单) 求问模式达人,静态类可否代替单件? 使Div内内容可编辑:) GridView&DetailsView对XML文件增删改 对象池及数据库连接对象池
让窗体关闭按钮无效新法
萝卜青菜 · 2006-07-22 · via 博客园 - 萝卜青菜

让窗体关闭按钮无效新法

以前写过一个,有点笨:)
让窗体关闭按钮无效

呵呵,这个简单:

        protected override void WndProc(ref Message m)
        {
            
base.WndProc(ref m);
            
// 0x84 : WM_NCHITTEST
            if (m.Msg == 0x84
            {
                
// 20   : HTCLOSE
                if (m.Result == (IntPtr)20
                {
                    
// 0    : HTNOWHERE
                    m.Result = (IntPtr)0;
                }
            }
        }

MDI 窗体有效。

posted on 2006-07-22 16:33  萝卜青菜  阅读(979)  评论(4)    收藏  举报

刷新页面返回顶部