一定可以!!!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure CreateParams(var Params: TCreateParams);override; //注意
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.DFM}
procedure TForm1.CreateParams(var Params:TCreateParams );
begin
inherited CreateParams(Params);
with Params do
begin
ExStyle :=ExStyle or WS_EX_TOPMOST;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show;
end;
end.