//SHFormatDrive関数をインポートする
function SHFormatDrive( nHandle : hWnd; nDrive
: Integer; nIDs :Integer;dwFlag:Integer):Integer; stdcall;external
shell32
procedure TForm1.Button1Click(Sender: TObject);
Const
SHFMT_OPT_FULL=1 ;//通常のファーマットをチェック
begin
//フォーマットダイアログを表示する
ShFormatDrive(Form1.Handle,0,0,SHFMT_OPT_FULL);
end;
end.
|