S
sycamore
Unregistered / Unconfirmed
GUEST, unregistred user!
我想做一个多媒体界面,无标题栏,我用下面的方法可以在运行情况下移动,但我想关闭点SpeedButton1却没反应,请问该如
何使界面可以移动又点击其他控件有反应呢?
interface
.....
type
TForm1 = class(TForm)
Image1: TImage;
SpeedButton1: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
procedure WMNchittest(var msg:twmnchittest);
MESSAGE WM_NCHITTEST;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.WMNChitTest(var Msg:TWMNChitTest);
begin
inherited;
if msg.Result=htclient then
msg.Result:=htcaption;
end;
end.
请问我该增加什么语句才能使我的SpeedButton1生效(急)
何使界面可以移动又点击其他控件有反应呢?
interface
.....
type
TForm1 = class(TForm)
Image1: TImage;
SpeedButton1: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
procedure WMNchittest(var msg:twmnchittest);
MESSAGE WM_NCHITTEST;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.WMNChitTest(var Msg:TWMNChitTest);
begin
inherited;
if msg.Result=htclient then
msg.Result:=htcaption;
end;
end.
请问我该增加什么语句才能使我的SpeedButton1生效(急)