gretro
Messages postés13Date d'inscriptionvendredi 12 juin 2009StatutMembreDernière intervention27 septembre 2009
-
1 août 2009 à 07:20
gretro
Messages postés13Date d'inscriptionvendredi 12 juin 2009StatutMembreDernière intervention27 septembre 2009
-
2 août 2009 à 08:38
Bonjour, je suis en train de créer une application qui indexe quelques fichiers dans une base de données avec leur chemin d'accès complet. Seulement, j'aimerais qu'au Clic d'un bouton, l'Explorateur Windows ouvre une nouvelle fenêtre avec le chemin du dossier parent. Comment m'y prendre ?
Minotthor
Messages postés72Date d'inscriptionvendredi 16 mai 2003StatutMembreDernière intervention12 août 20092 1 août 2009 à 11:50
Voici un code un peu plus complet :
string FilePath = @"C:\Program Files (x86)\AMD\Athlon 64 Processor Driver\amdk8.sys"; // Le chemin d'accès du fichier
string DirectoryPath = FilePath.Substring (0, FilePath.LastIndexOf ('\\') + 1); // On supprime tout ce qui vient après le dernier \
Process ExplorerProcess = new Process ();
ExplorerProcess.StartInfo.FileName = "explorer"; // explorer
ExplorerProcess.StartInfo.Arguments = DirectoryPath; // Le chemin d'accès du répertoire en argument
ExplorerProcess.Start ();