1,183
社区成员
发帖
与我相关
我的任务
分享
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Buttons;
type
TForm1 = class(TForm)
SpeedButton1: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure RunDialog(OwnerWnd: HWND; Icon: HICON; lpstrDirectory: PChar;
lpstrTitle: PChar; lpstrDescription: PChar; Flags: LongInt); stdcall;
external 'Shell32.dll' index 61;
implementation
{$R *.dfm}
procedure TForm1.SpeedButton1Click(Sender: TObject);
const
RFF_NOBROWSE = 1;
var
Flags: LongInt;
FIcon: TIcon;
begin
FIcon := TIcon.Create;
Flags := Flags or RFF_NOBROWSE;
RunDialog(0, FIcon.Handle, nil { PChar(FInitialDir) } , PChar('比尔的标题'),
PChar('杀死比尔'), Flags);
FIcon.Free;
end;
end.