خالی کردن recycle bin در ویندوز با کدنویسی وی بی دات نت vb dot net
پنجشنبه, ۲۵ تیر ۱۳۹۴، ۰۲:۴۱ ق.ظ
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 + SHERB_NOSOUND) SHUpdateRecycleBinIcon() End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click EmptyRecycleBin() End Sub
۹۴/۰۴/۲۵