zoukankan      html  css  js  c++  java
  • SetWindowLong 除去窗体标题栏

    procedure TForm1.Button1Click(Sender: TObject); 
    begin
           //隐藏标题栏
          SetWindowLong(Form1.Handle,GWL_STYLE, GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION);
          Height:=ClientHeight;
    end;


    C# 去除无边框

            [System.Runtime.InteropServices.DllImport("USER32.DLL")]
            public static extern int SetWindowLong(IntPtr hWndint nIndexint dwNewLong);
     
            [System.Runtime.InteropServices.DllImport("USER32.DLL")]
            public static extern int GetWindowLong(IntPtr hWndint nIndex);
     
            public static int GWL_STYLE = -16;
            public static int WS_CHILD = 0x40000000; //child window
            public static int WS_BORDER = 0x00800000; //window with border
            public static int WS_DLGFRAME = 0x00400000; //window with double border but no title
            public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME//window with a title bar
     
            private void Form1_Load(object senderEventArgs e)
            {
                int style = GetWindowLong(HandleGWL_STYLE);
                SetWindowLong(HandleGWL_STYLE, (style & ~WS_CAPTION));
                Height = ClientRectangle.Height;

            }  

  • 相关阅读:
    centos7.6 redis
    centos7.5 rabbitmq3.7.4
    centos7.6 nfs
    nginx跨域
    Linux进阶教程丨第1章:访问命令行
    Representation Learning for Event-based Visuomotor Policies
    Goland 2019下载和安装(带破解补丁和汉化包)
    Adobe XD CC 2020中文破解版(附破解教程)
    SSH 三步解决免密登录
    cygwin命令行安装
  • 原文地址:https://www.cnblogs.com/xe2011/p/2531616.html
Copyright © 2011-2022 走看看