送分题

ypyRock 2002-04-15 03:49:06
一个FORM不要标题栏(上面蓝色的条)但又可以改变大小,怎么实现?
将FORM的BorderStyle设为bsNone可以去掉标题栏,但也不能改变大小了:(
...全文
83 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
ypyRock 2002-04-16
  • 打赏
  • 举报
回复
zSWANg(伴水)(* pascal→c *) :
你的方法好像有繁琐,鼠标形状怎么改变??

FlyingQQ(FlyingQQ):
能不能再讲详细点??
ypyRock 2002-04-16
  • 打赏
  • 举报
回复
zx_wang(wzx) :
你是用这个吗?
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style :=Style and (not WS_CAPTION);
Style :=Style or WS_POPUP;
end
end;


如果是其他的,我给100分你
xpony 2002-04-15
  • 打赏
  • 举报
回复
你用
procedure CreateParams(var Params: TCreateParams); override;
试试
参数 Params 具体怎么设置 我忘记了:(
zx_wang 2002-04-15
  • 打赏
  • 举报
回复
我有一个相当简单的办法,前提是你把50分给我
jholdnew 2002-04-15
  • 打赏
  • 举报
回复
d5开发指南
此书中正好有此实例,有很妙的方法
zx_wang 2002-04-15
  • 打赏
  • 举报
回复
我有一个相当简单的办法,前提是你把100分给我

FlyingQQ 2002-04-15
  • 打赏
  • 举报
回复
让form的大小设置属性动态的接受设置!你试试,我不知道是否可行!
FlyingQQ 2002-04-15
  • 打赏
  • 举报
回复
在程序中动态设置啊,
lovewangj 2002-04-15
  • 打赏
  • 举报
回复
???
王集鹄 2002-04-15
  • 打赏
  • 举报
回复
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WMNCHITTEST(var Msg : TWMNCHITTEST); message WM_NCHITTEST;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

{ TForm1 }

procedure TForm1.WMNCHITTEST(var Msg: TWMNCHITTEST);
const
cOffset = 10;
var
vPoint: TPoint;
begin
inherited;
vPoint := ScreenToClient(Point(Msg.XPos, Msg.YPos));
if PtInRect(Rect(0, 0, cOffset, cOffset),vPoint) then
Msg.Result := HTTOPLEFT
else if PtInRect(Rect(Width - cOffset, Height - cOffset, Width, Height), vPoint) then
Msg.Result := HTBOTTOMRIGHT
else if PtInRect(Rect(Width - cOffset, 0, Width, cOffset), vPoint) then
Msg.Result := HTTOPRIGHT
else if PtInRect(Rect(0, Height - cOffset, cOffset, Height), vPoint) then
Msg.Result := HTBOTTOMLEFT
else if PtInRect(Rect(cOffset, 0, Width - cOffset, cOffset), vPoint) then
Msg.Result := HTTOP
else if PtInRect(Rect(0, cOffset, cOffset, Height - cOffset), vPoint) then
Msg.Result := HTLEFT
else if PtInRect(Rect(Width - cOffset, cOffset, Width, Height - cOffset), vPoint) then
Msg.Result := HTRIGHT
else if PtInRect(Rect(cOffset, Height - cOffset, Width - cOffset, Height), vPoint) then
Msg.Result := HTBOTTOM;
end;

end.

5,386

社区成员

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

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