DELPHI中,如何去掉MID子窗口的标题栏?

chucg 2001-04-19 05:15:00
DELPHI中,如何去掉MID子窗口的标题栏?谢谢!
祝:工作顺利!
小初
...全文
163 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
rh 2001-04-19
  • 打赏
  • 举报
回复
谢谢草哥!
ferrerocao 2001-04-19
  • 打赏
  • 举报
回复
只需在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的属性中进行设置,也可以实现此类效果。
(来自碧草青青 http://rongercao.go.163.com)
manjel 2001-04-19
  • 打赏
  • 举报
回复
mdichildren[i].caption:='';

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧