VB Code:
Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwnd As Long, ByVal iDrive As Long, ByVal iCapacity As Long, ByVal iFormatType As Long) As Long Private Sub Form_Load() ' Drive values A = 0, B = 1, etc ' To quick format drive with default capacity ' To Format A drive SHFormatDrive hWnd, 0, 0, 0 ' To Format B drive ' SHFormatDrive hWnd, 1, 0, 0 ' To Format C drive ' SHFormatDrive hWnd, 2, 0, 0 ' and so on. ' For command line use ' rundll32.exe shell32.dll,SHFormatDrive End Sub


Reply With Quote