给段代码给你,一试即成…………
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, jpeg;
type
TForm1 = class(TForm)
Image1: TImage;
Bevel1: TBevel;
procedure FormCreate(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.FormCreate(Sender: TObject);
begin
//SetWindowLong(application,Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
end;
procedure TForm1.wmnchittest(var msg:twmnchittest);
begin
inherited;
if (htclient=msg.result) then msg.result:=htcaption;
end;
end.