Empty recycle bin
All tutorials created in C# to be posted in here.
1 post
Page 1 of 1
hey guys
with this snippet you can clear your recycle bin
enjoy
original source - http://ultimateprogrammingtutorials.blo ... ing-c.html
with this snippet you can clear your recycle bin
Code: Select all
i am using button click event here by the way place the enum reclyflags lines after the
enum RecycleFlags : uint
{
SHERB_NOCONFIRMATION = 0x00000001,
SHERB_NOPROGRESSUI = 0x00000001,
SHERB_NOSOUND = 0x00000004
}
[DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
static extern uint SHEmptyRecycleBin(IntPtr hwnd, string pszRootPath,
RecycleFlags dwFlags);
private void button1_Click(object sender, EventArgs e)
{
uint result = SHEmptyRecycleBin(IntPtr.Zero, null, 0);
}
Code: Select all
also you need the namespace InitializeComponent();
}
Code: Select all
download sampleusing System.Runtime.InteropServices;
enjoy
original source - http://ultimateprogrammingtutorials.blo ... ing-c.html
You do not have the required permissions to view the files attached to this post.
Find my programs on Softpedia
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023