我想使我的程序的标题栏变得独特一点,希望能加上一点背景,改变一下颜色,最好能把最大最小化那几个按钮样式也变一下,就象XP风格这样的,但又不想用换肤控件,只想自己编程实现,哪位高手有这方面的文章或源码介绍一下,多谢了!
解决方案 »
- 要开发一款软件,美工已经做好界面效果图,如何把窗体做到图片的效果呢?
- 如何获取系统安全策略?
- 紧急求救,有关SyBase
- 有关wwDBGrid标题的问题????请各位帮忙!!!
- 如何获得数据库大小?
- 高手:打开钱箱时死机!(钱箱接在打印机上的)我在网上搜过了,没有人给出过答案.分不够单独给
- 为什么不好使阿?
- 关于form的先后问题
- 突然发现自己还有1W多分.呵呵.散散分.来者有分.大家热闹一下(3)
- Delphi调用Excel的高手请入:Server征解
- 怎样将Edit1定义个快捷键Alt+U,Edit2定义个快捷键Alt+P使光标能快速定位和编辑。
- 请问大虾,打开ie窗口后,在 delphi应用程序里怎么关闭它。
uses messages...
....private
procedure WMNCHitTest(VAR M:TWMNCHITTEST);message wm_NCHitTest;
....
....
PROCEDURE TF_qqlist.WMNCHitTest(var M: Twmnchittest);
begin
inherited;
if M.Result = htClient then
begin if (m.YPos - F_qqlist.top )<20 then
begin
m.result := htcaption;
end ; { if ((m.ypos -F_qqlist.Top ) >(F_qqlist.Height - 5 )) and
((m.xpos-F_qqlist.left) > (F_qqlist.Width -5)) then
m.result :=htbottomright; //右下角
if ((m.ypos-F_qqlist.top) > (F_qqlist.height-5)) and
((m.xpos-F_qqlist.left)< 5) then
m.result:=htBottomleft; //左下角
if ((m.ypos-F_qqlist.top) < 5) and
((m.xpos-F_qqlist.left)< 5) then
m.result:=httopleft; //左上角
if ((m.xpos - F_qqlist.left) >(F_qqlist.Width -5)) and
((m.ypos - F_qqlist.Top ) < 5) then
m.result:=httopright; //右上角 if ((m.ypos-F_qqlist.top) <5) and
((m.xpos-F_qqlist.left)> 5) and
((m.xpos - F_qqlist.left) <(F_qqlist.Width -5)) then
m.result:=httop; //顶部 if ((m.ypos -F_qqlist.Top ) > (F_qqlist.Height - 5 )) and
((m.xpos-F_qqlist.left)<(F_qqlist.Width -5)) and
((m.xpos-F_qqlist.left)>5) then
m.result:=htbottom; //底部 if ((m.xpos-F_qqlist.left)<10) and
((m.ypos -F_qqlist.Top ) < (F_qqlist.Height - 5 )) and
((m.ypos-F_qqlist.top) > 5) then
m.result:=htleft; //左边
if ((m.xpos-F_qqlist.left)>(F_qqlist.Width -10)) and
((m.ypos -F_qqlist.Top ) < (F_qqlist.Height - 5 )) and
((m.ypos - F_qqlist.Top ) > 5) then
m.result:=htright; //右边 }
end;
END;
procedure TF_qqlist.FormResize(Sender: TObject);
begin
img_close.left:=F_qqlist.width-34;
end;事先将caption 栏去掉(改为无边界)
然后自己画一个image放在顶部,最大化,最小化按钮也一样.参见 鄙人的劣作: QQ登陆号码清除器
在CSDN 网络安全里