zoukankan      html  css  js  c++  java
  • c#无边框窗体移动 屏蔽双击最大化

    namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
           public Form1()
            {
                InitializeComponent();
            }
            private const int WM_NCHITTEST = 0x84;
    10          private const int HTCLIENT = 0x1;
    11          private const int HTCAPTION = 0x2;
    12          private const int WM_NCLBUTTONDBLCLK = 0xA3;//鼠标双击标题栏消息
    13   
    14          protected override void WndProc(ref Message m)
    15          {
    16              switch (m.Msg)
    17              {
    18                  case WM_NCHITTEST:
    19                      base.WndProc(ref m);
    20                      if ((int)m.Result == HTCLIENT)
    21                          m.Result = (IntPtr)HTCAPTION;
    22                      return;
    23                 case WM_NCLBUTTONDBLCLK:      
    24                          break;
    25                 default:
    26                          base.WndProc(ref m);
    27                          break;
    28              }
    29             
    30          }
    31  }
    32   
  • 相关阅读:
    176. Second Highest Salary
    175. Combine Two Tables
    172. Factorial Trailing Zeroes
    171. Excel Sheet Column Number
    169. Majority Element
    168. Excel Sheet Column Title
    167. Two Sum II
    160. Intersection of Two Linked Lists
    个人博客记录
    <meta>标签
  • 原文地址:https://www.cnblogs.com/dyufei/p/2573932.html
Copyright © 2011-2022 走看看