|
-
November 15th, 1999, 11:11 AM
#1
format a disk
I want to format a 1.44Mo disk from a VB form.
I wrote a code with the shell function:
Call Shell("c:\winnt\system32\format.com a: /V:vol_32 ", vbNormalFocus)
This method is not very smart and open a MSDOS prompt, which is not so cool in a windows application!!!
Is there an ActiveX which can do that?
How can i launch the format utility of the Explorer from a VB App??
Thanks
Fzz
-
November 16th, 1999, 03:53 AM
#2
Re: format a disk
to launch the shell's format function:
option Explicit
private Declare Function SHFormatDrive Lib "shell32.dll" (byval hwnd as Long, _
byval drive as Long, _
byval fmtid as Long, _
byval options as Long) as Long
private Sub Command1_Click()
Dim l as Long
l = SHFormatDrive(me.hwnd, 0, &HFFFF, 0)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|