i want to do format usb drive from vb.net code. have u any idea then let me know.
i am using following 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
Dim ret As Long
'' I want a full format
ret = SHFormatDrive(hWnd, 4, -1, 1)
Select Case ret
Case -1
MsgBox("Error during format operation")
Case -2
MsgBox("Operation canceled by user")
Case -3
MsgBox("This drive cannot be formatted")
Case Else
MsgBox("Done")
.....
at call function SHFormat i have to pass "Me.hWnd" .. so please if any body know how to do this using vb.net..
and hWnd is passed for parent execution
as per my knowledge "Me" is not supported
Please help me out or if you have other idea then also tell me
Thanks in advance

New Topic/Question
Reply




MultiQuote





|