Private Declare Function SHFormatDrive Lib"shell32"_
( ByVal Hend AS Long,_
ByVal Drive AS Long,_
ByVal FormatID AS Long,_
ByVal Options AS Long) as Long
Private Sub FormatDisk(intDrive as integer,blnQuickFormat as Boolean)
dim lngReturn As Long;
if (blnQuickFormat) then
lngReturn= SHFormatDrive(0,intDrive,0&,1&)
else
lngReturn= SHFormatDrive(0,intDrive,0&,0&)
end if
end Sub
Private Sub Command1_Click()
call FormatDisk(0,True)
End Sub
运行此程序。