Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Empty Recycle Bin for a drive or all drives! You ...
Author:
M. Jahedbozorgan
E-mail:
Click to e-mail author
Website:
http://www.geocities.com/m_jahedbozorgan/
Submitted:
10/11/2001
Version:
VB5, VB6, V
Compatibility:
VB5, VB6, VB.NET
Category:
Windows API
Views:
13578
Empty Recycle Bin for a drive or all drives! You can optionally turn off confirmation dialogs, progress dialog, and sounds.
Declarations:
Option Explicit Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal HWnd As Long, ByVal pszRootPath As String, ByVal dwFlags As Long) As Long
Code:
Public Sub MakeRecycleBinEmpty(Optional ByVal Drive As String, Optional NoConfirmation As Boolean, Optional NoProgress As Boolean, Optional NoSound As Boolean) Dim HWnd, Flags As Long On Error Resume Next HWnd = Screen.ActiveForm.HWnd If Len(Drive) > 0 Then _ Drive = Left$(Drive, 1) & ":\" Flags = (NoConfirmation And &H1) Or (NoProgress And &H2) Or (NoSound And &H4) SHEmptyRecycleBin HWnd, Drive, Flags End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement