|
-
Oct 31st, 2000, 04:25 PM
#1
Thread Starter
New Member
I am using the SHFormat drive API. I want to call a disk check routine when the API is complete. How can I postpone the call function until the API completes?
Code:
Private Sub Command5_Click()
Dim rtn As String
Dim Buffer As String
Dim WinPath As String
Buffer = String(255, 0)
rtn = GetWindowsDirectory(Buffer, Len(Buffer))
WinPath = Left(Trim(Buffer), rtn)
rtn = Shell(WinPath + "\rundll32.exe shell32.dll,SHFormatDrive", 1)
Call DiskCheck 'Need to wait here!!!!!
End Sub
Your help would be appreciated
-
Oct 31st, 2000, 07:44 PM
#2
Add a DoEvents.
DoEvents will wait until all code above is processed before processing to the next code.
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
|