| SHEmptyRecycleBin, SHUpdateRecycleBinIcon |
|
|
| Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" _ |
| (ByVal hwnd As Long, ByVal pszRootPath As String, ByVal dwFlags As Long) As Long |
| Private Declare Function SHUpdateRecycleBinIcon Lib "shell32.dll" () As Long |
|
| Private Sub Form_Load() |
| Dim x |
| x = MsgBox("Papierkorb leeren?", vbQuestion + vbYesNo, "Papierkorb leeren?") |
| If x = 6 Then |
| |
| 'mit Abfrage des Systems: |
| 'SHEmptyRecycleBin Me.hwnd, vbNullString, 0 |
| |
| 'ohne Abfrage des Systems: |
| 'SHEmptyRecycleBin Me.hwnd, vbNullString, &H1 |
| |
| 'ohne Fortschrittsbalken: |
| 'SHEmptyRecycleBin Me.hwnd, vbNullString, &H2 |
| |
| 'ohne Soundeffekt |
| 'SHEmptyRecycleBin Me.hwnd, vbNullString, &H4 |
|
| 'Kombination: ohne Abfrage, ohne Fortschrittsbalken und ohne Soundeffekt |
| SHEmptyRecycleBin Me.hwnd, vbNullString, &H1 + &H2 + &H4 |
|
| 'das Papierkorb-Symbol wird auf "geleert" zurückgesetzt |
| SHUpdateRecycleBinIcon |
| End If |
| End Sub |
|