Delphi 窗口没有边框的方法
来源:互联网 发布:镇江java培训学费 编辑:程序博客网 时间:2024/06/05 05:34
只需在form子窗体中create中写入以下代码,就可以了。
setwindowlong(handle,GWL_STYLE,getwindowlong(handle,GWL_STYLE)and not ws_caption);
clientheight:=height;
refresh;
以上代码我实验过,完全可行。
当然你还可以改变子窗体的其他选项,如下:
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的属性中进行设置,也可以实现此类效果。
setwindowlong(handle,GWL_STYLE,getwindowlong(handle,GWL_STYLE)and not ws_caption);
clientheight:=height;
refresh;
以上代码我实验过,完全可行。
当然你还可以改变子窗体的其他选项,如下:
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的属性中进行设置,也可以实现此类效果。
- Delphi 窗口没有边框的方法
- Delphi中拖动无边框窗口的5种方法
- Delphi中拖动无边框窗口的5种方法
- 没有边框IE窗口的实现
- 解决Ubuntu窗口没有边框的问题
- Delphi 窗口置顶的方法
- Delphi 窗口置顶的方法
- 确定窗口边框大小的方法/js
- c#中两种方法拖动没有边框的窗体
- winform技巧—没有边框移动窗体的方法
- 最好的移动无边框窗口的方法
- 计算窗口边框厚度、标题栏高度最正确的方法
- Delphi窗口无边框时显示窗口阴影
- Delphi中创建一个可以改变大小的无边框窗口
- Delphi中创建一个可以改变大小的无边框窗口
- 窗口变化,部分控件随着与右边框和上边框保持固定距离的方法
- 将form提交到一个没有边框的弹出窗口中
- 没有上边框的Table
- Android系统手机端抓包方法
- 瀑布流库
- [oracle]初始化参数文件spfile、pfile及修改参数的两种方式
- C++类成员的初始化
- Android使用XML全攻略(2)
- Delphi 窗口没有边框的方法
- 用于网络协议测试的工具
- 假数据自我添加测试--NSArray object
- C++拷贝构造函数详解
- POJ2513Colored Sticks一笔画问题
- register_chrdev 深入解析
- 成员变量
- ORDERED 和 USE_NL() hint (zt)的用法
- Android中Paint字体的使用