网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > Delphi
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.Delphi,编译文件(第8页).
.从delphi6,kylix看borland的未来.
.用Delphi编写点对点传文件程序(1).
.华为CMPP源码delphi6版.
.在Delphi里调用API函数动态建立O.
.使用IntraWeb进行Web编程(二).
.Delphi图象截取编程示例(5).
.SQLServer中按某字段排列名次.
.通用图像识别的神经网络代码描述.
.想学win9x,nt,w2k下进程的深度隐.
.创建Photoshop式浮动窗口应用程序.
.大自然的BUG、人的BUG、软件的疑.
.终于看到了传说中的Delphi9以及我.
.读写CMOS内存.
.在delphi把字符串分割成一维数组.
.详细教你如何使用delphi中thread.
.Delphi开发经验四则.
.Delphi编程实现Ping操作.
.在Delphi中编写控件的基本方法(1).
.让弹出式广告就地正法.

控件在运行状态改变大小

发表日期:2006-2-4


我的主页: http://www.tommstudio.com/

使用下面的方法可以让控件在运行状态改变大小,就像在窗体编辑器中一样.


type
tddhsizebutton=class(tbutton)
public
procedure WmNcHitTest(var msg:TWmNcHitTest);
message wm_NcHitTest;
end;  

procedure TDdhSizeButton.WmNcHitTest(var msg:TWmNcHitTest);
var
pt:tpoint;
begin
  pt:=point(msg.xpos,msg.ypos);
  pt:=ScreentoClient(pt);
  if (pt.x<5) and (pt.y<5) then
  msg.Result:=httopright
  else if (pt.x>width-5) and (pt.y<5) then
  msg.Result:=httopright
  else if (pt.x >width-5) and (pt.y>height-5) then
  msg.Result:=htbottomright
  else if (pt.x<5) and (pt.y>height-5) then
  msg.Result:=htbottomleft
  else if (pt.x<5) then
  msg.Result:=htleft
  else if (pt.y<5) then
  msg.Result:=httop
  else if (pt.x>width-5) then
  msg.Result:=htright
  else if (pt.y>height-5) then
  msg.Result:=htbottom
  else
  inherited;
end;


上一篇:XP/2003下开放3389最简单的方法 人气:4892
下一篇:如何取得某些特殊文件夹路径 人气:5077
浏览全部Delphi的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐