|
Vb.net |
Public Class Form1
Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hWnd As Int32, ByVal pszRootPath As String, ByVal dwFlags As Int32) As Int32
Private Declare Function SHUpdateRecycleBinIcon Lib "shell32.dll" () As Int32
Private Const SHERB_NOCONFIRMATION = &H1
Private Const SHERB_NOPROGRESSUI = &H2
Private Const SHERB_NOSOUND = &H4
Private Sub EmptyRecycleBin()
SHEmptyRecycleBin(Me.Handle.ToInt32, vbNullString, SHERB_NOCONFIRMATION)
SHUpdateRecycleBinIcon()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
EmptyRecycleBin()
MessageBox.Show("//Silme işlemi tamamlandı")
End Sub
End Class
0 yorum :
Yorum Gönder