Chcel som niečo také:
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Shell32;
namespace OpenedFolderCsharp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Interval = 1000;
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
Shell MShel = new Shell();
ShellFolderView SFV = new ShellFolderView();
listView1.Clear();
foreach (var o in MShel.Windows())
{
SFV = o.document;
ListViewItem item = new ListViewItem(SFV.Folder.Title.ToString());
listView1.Items.Add(item);
}
}
}
}
|