C# WindowsForm エクスプローラ Form1.cs
2022-08-25


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.WindowsAPICodePack.Shell;

namespace myExprore
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Shown(object sender, EventArgs e)
        {
            explorerBrowser1.Navigate((ShellObject)KnownFolders.Desktop);
        }

        private void explorerBrowser1_NavigationComplete(object sender, Microsoft.WindowsAPICodePack.Controls.NavigationCompleteEventArgs e)
        {
            //
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string mylocation;
            ShellObject myfolder;

            //mylocation = "c:\\aaa\\example";
            mylocation = textBox1.Text;
            myfolder= ShellObject.FromParsingName(mylocation);
            explorerBrowser1.Navigate(myfolder);            
        }

        private void explorerBrowser1_SelectionChanged(object sender, EventArgs e)

続きを読む


コメント(全0件)


記事を書く
powered by ASAHIネット