Cemalizim | 19 Temmuz 2008 15:59 | Geri Dönüşüm Kutusunu Boşaltma Windows işletim sisteminde Geri Dönüşüm Kutusunu boşaltan program kodu PHP- Kodu: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.IO; namespace RBinTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // İşlemi yapan kod bu kısımdır uint result = SHEmptyRecycleBin(IntPtr.Zero, null, 0); // Program açılışında geri dönüşüm kutusunu boşaltır } 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); } }
alıntı |