ForumKalbi.Com

ForumKalbi.Com (https://www.forumkalbi.com/index.php)
-   Bilgisayar (https://www.forumkalbi.com/forumdisplay.php?f=220)
-   -   C# Geri Dönüşüm Kutusunu Boşaltma (https://www.forumkalbi.com/showthread.php?t=4650)

Candres 27 Ocak 2024 18:57

C# Geri Dönüşüm Kutusunu Boşaltma
 
C# Geri Dönüşüm Kutusunu Boşaltma
Kod:
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);
}
}


Forum saati; Türkiye'ye göre ayarlanmış olup, şu an saat: 15:53.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Navbar with Avatar by Motorradforum