zoukankan      html  css  js  c++  java
  • form变身五法

    你是不是厌倦了平时的form,不用担心我们可以利用winapi函数来改变它的模样。
    1、使窗体没有边框
    在form的create事件中
    var
    windowstyle:longint;
    windowstyle:=getwindowlong(handle,GWL_Style);
    setwindowlong(handle,GWL_Style,windowstyle and not WS_Border);
    clientheight:=height;
    refresh;
    2、使窗体没有系统菜单
    var
    windowstyle:longint;
    windowstyle:=getwindowlong(handle,GWL_Style);
    setwindowlong(handle,GWL_Style,windowstyle and not WS_Sysmenu);
    clientheight:=height;
    refresh;
    3、使窗体最大值无效
    var
    windowstyle:longint;
    windowstyle:=getwindowlong(handle,GWL_Style);
    setwindowlong(handle,GWL_Style,windowstyle and not WS_Maximizebox);
    clientheight:=height;
    refresh;
    4、使窗体最小值无效
    var
    windowstyle:longint;
    windowstyle:=getwindowlong(handle,GWL_Style);
    setwindowlong(handle,GWL_Style,windowstyle and not WS_Minimizebox);
    clientheight:=height;
    refresh;
    5、使窗体没有标题
    var
    windowstyle:longint;
    windowstyle:=getwindowlong(handle,GWL_Style);
    setwindowlong(handle,GWL_Style,windowstyle and not WS_Caption);
    clientheight:=height;
    refresh;
    是不是有了变化,不过其中有些功能可以从form的属性中进行设置,也可以实现此类效果
  • 相关阅读:
    独立安装SharePoint 2013碰到的"SDDL"问题及解决方法
    软件编程21法则
    HtmlAgilityPack 之 HtmlNode类
    SpringBoot集成Hadoop3.1.3
    win10 mysql慢查询
    Java多线程并行计算(Google的Guava使用)
    win10安装hadoop3.1.3
    mapDB的基本用法
    SpringBoot集成JMH
    mysql死锁
  • 原文地址:https://www.cnblogs.com/xiaomangnan/p/1778815.html
Copyright © 2011-2022 走看看