by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Display Format drive dialog using SHFormatDrive API
' 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
End Sub