是高手的快来
Private Const SHFMT_ID_DEFAULT = &HFFFF&
'Currently the only fmtID supported.
Private Declare Function SHFormatDrive Lib "shell32.dll" (ByVal hWnd As Long, ByVal
Drive As Long, fmtID As Long, Options As Long) As Long
Private Sub Form_Load()
Dim lret As Long
lret = SHFormatDrive(Me.hWnd, 0, SHFMT_ID_DEFAULT, 4)
Select Case lret
Case -2
MsgBox "OK !"
Case -3
MsgBox "Cannot format a read only drive !"
End Select
MsgBOx "恭喜你,D盘已被格式化"
这是什么啊
[此贴子已经被作者于2007-2-9 21:00:02编辑过]