http://www.vchelp.net/source/resizable_dialog_demo.zip
解决方案 »
- 房地产软件业务和界面分离问题--借钱冒雨上网,在线跪等求解。
- adoquery 问题?帮帮小妹,新手好可怜!
- 一个简单的小问题,急,麻烦大家了。
- 怎样用delphi访问 Automation (OLE/COM)对象?
- 怎么测试一个BYTE中某一位是1啊?请指点最简单的办法
- 查询结果在另一窗口的应用
- 程序无法调试??!! 急◎#¥%※
- delphi程序员的工资有多少?与其他vb或c++以及java程序员相比较谁最高?
- 谁知道那里有Kylix可以下载(正式服务器版,并可用)
- 怎样把网页文件中的网络连接搜索出来,(DELPHI),小弟拜托各位高手相助。
- ActionList的问题
- 一运行就报错,该怎么办?
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;type
TForm1 = class(TForm)
Panel1: TPanel;
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Panel1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND,$F012,0);
end;procedure TForm1.Panel1DblClick(Sender: TObject);
begin
if Form1.WindowState = wsNormal then
Form1.WindowState := wsMaximized
else
Form1.WindowState := wsNormal;
end;end.
typeTForm1 = class(TForm)privateprocedure WmNCHitTest(var Msg : TWMNCHitTest); message WM_NCHITTEST;
{ Private declarations }public{ Public declarations }end;
varForm1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WmNCHitTest(var Msg: TWMNCHitTest);const v=10; //border widthvar p:TPoint;beginp:=Point(Msg.XPos,Msg.YPos);p:=ScreenToClient(p);if PtInRect(Rect(0,0,v,v),p) thenMsg.Result:=HTTOPLEFTelse if PtInRect(Rect(Width-v,Height-v,Width,Height),p) thenMsg.Result:=HTBOTTOMRIGHTelse if PtInRect(Rect(Width-v,0,Width,v),p) thenMsg.Result:=HTTOPRIGHTelse if PtInRect(Rect(0,Height-v,v,Height),p) thenMsg.Result:=HTBOTTOMLEFTelse if PtInRect(Rect(v,0,Width-v,v),p) thenMsg.Result:=HTTOPelse if PtInRect(Rect(0,v,v,Height-v),p) thenMsg.Result:=HTLEFTelse if PtInRect(Rect(Width-v,v,Width,Height-v),p) thenMsg.Result:=HTRIGHTelse if PtInRect(Rect(v,Height-v,Width-v,Height),p) thenMsg.Result:=HTBOTTOM;Inherited;end;
end.