软件在运行期,修改panel的位置与大小
2014-05-05 22:07
471 查看
procedureTForm1.Panel1MouseDown(Sender:TObject;Button:TMouseButton; Shift:TShiftState;X,Y:Integer); begin ReleaseCapture; if(x>=0)and(x<=3)then begin if(y>=0)and(y<=3)thenPanel1.Perform(WM_SysCommand,$F004,0); if(y>3)and(y<Panel1.Height-3)thenPanel1.Perform(WM_SysCommand,$F001,0); if(y>=Panel1.Height-3)and(y<=Panel1.Height)thenPanel1.Perform(WM_SysCommand,$F007,0); end elseif(x>3)and(x<Panel1.Width-3)then begin if(y>=0)and(y<=3)thenPanel1.Perform(WM_SysCommand,$F003,0); if(y>3)and(y<Panel1.Height-3)thenPanel1.Perform(WM_SysCommand,$F012,0); if(y>=Panel1.Height-3)and(y<=Panel1.Width)thenPanel1.Perform(WM_SysCommand,$F006,0); end elseif(x>=Panel1.Width-3)and(x<=Panel1.Width)then begin if(y>=0)and(y<=3)thenPanel1.Perform(WM_SysCommand,$F005,0); if(y>3)and(y<Panel1.Height-3)thenPanel1.Perform(WM_SysCommand,$F002,0); if(y>=Panel1.Height-3)and(y<=Panel1.Width)thenPanel1.Perform(WM_SysCommand,$F008,0); end; end;
procedureTForm1.Panel1MouseMove(Sender:TObject;Shift:TShiftState;X,
Y:Integer);
begin
if(x>=0)and(x<=3)then
begin
if(y>=0)and(y<=3)thenPanel1.Cursor:=crSizeNWSE;
if(y>3)and(y<Panel1.Height-3)thenPanel1.Cursor:=crSizeWE;
if(y>=Panel1.Height-3)and(y<=Panel1.Height)thenPanel1.Cursor:=crSizeNESW;
end
elseif(x>3)and(x<Panel1.Width-3)then
begin
if(y>=0)and(y<=3)thenPanel1.Cursor:=crSizeNS;
if(y>3)and(y<Panel1.Height-3)thenPanel1.Cursor:=crArrow;
if(y>=Panel1.Height-3)and(y<=Panel1.Width)thenPanel1.Cursor:=crSizeNS;
end
elseif(x>=Panel1.Width-3)and(x<=Panel1.Width)then
begin
if(y>=0)and(y<=3)thenPanel1.Cursor:=crSizeNESW;
if(y>3)and(y<Panel1.Height-3)thenPanel1.Cursor:=crSizeWE;
if(y>=Panel1.Height-3)and(y<=Panel1.Width)thenPanel1.Cursor:=crSizeNWSE;
end;
end;
相关文章推荐
- 使用Font Creator 6.5批量修改字体大小、位置
- 修改系统TabBar高度、文字大小和位置
- windows mobile 调整修改输入法面板大小和位置
- Delphi中运行时改变panel的位置及大小
- WPS简单五步操作修改图形并调整图形位置大小和旋转角度
- windows 10应用商店软件默认安装位置怎么修改?
- 修改 PHP 上传文件大小的两处修改位置
- 按照软件的模板规范要求,修改了模板中的字体大小,为何展示时,字体并未发生变化?
- iOS --修改button文字位置大小 以及设置button边框
- 修改系统UIAlertView的位置与大小
- C#代码设置窗体和Panel的位置大小
- win8软件安装位置在哪?windows8软件安装位置修改教程
- UIView+Extension方便在开发时快速修改视图的位置大小
- CString 文件修改指定位置的字符串(文件大小不变)
- Input placeholder属性样式修改(颜色,大小,位置)
- 永久激活windows10专业版(并防止杀毒软件查杀)+eclipse字体大小修改
- 注册表第二部份、修改窗口滚动条的大小,锁定任务栏的大小和位置
- 11gR2修改Grid软件ASM实例参数文件位置
- 修改软件安装默认位置
- 关于修改extmail附件大小限制的位置