|
Данный код вызывает окно "Очистить
содержимое корзины?"
Расположите на форме 2 элемента CommandButton. 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 ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile
As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As
Long) As Long
Const SHERB_NOPROGRESSUI = &H2
Const SW_SHOWNORMAL As Long = 1
Private Sub Command1_Click()
Call SHEmptyRecycleBin(Me.hWnd, "", SHERB_NOPROGRESSUI)
End Sub
Private Sub Command2_Click()
Dim success As Long
success = ShellExecute(h, "Open", "explorer.exe",
"/root,::{645FF040-5081-101B-9F08-00AA002F954E}", 0&, SW_SHOWNORMAL)
End Sub
|
|