先设置BorderStyle和BorderIcons
type
THelpForm = class (TForm)
private
procedure WMNCLBUTTONDOWN( var Msg: TWMNCLButtonDown) ; message WM_NCLBUTTONDOWN;
procedure WMNCLBUTTONUP( var Msg: TWMNCLButtonUp) ; message WM_NCLBUTTONUP;
end ;
var
HelpForm: THelpForm;
implementation
{$R *.dfm}
procedure THelpForm.WMNCLBUTTONDOWN( var Msg: TWMNCLButtonDown) ;
begin
if Msg.HitTest = HTHELP then
Msg.Result := 0 // "eat" the message
else
inherited ;
end ;
procedure THelpForm.WMNCLBUTTONUP( var Msg: TWMNCLButtonUp) ;
begin
if Msg.HitTest = HTHELP then
begin
Msg.Result := 0;
ShowMessage('Need help?') ;
end
else
inherited ;
end ;