string[] tableauCheminImage = Directory.GetFiles(@"C:\Nom", "*.jpg", SearchOption.AllDirectories);
maPictureBox.Image = Image.FromFile(cheminImage);
string dossier = cheminImage.Remove(cheminImage.LastIndexOf(@"")); System.Diagnostics.Process.Start(dossier);
try { string t = "C:\" + textBox1.Text; Process.Start(t); } catch // équivalent de catch(Exception) ou de catch(Exception e) { MessageBox.Show("Le dossier n'existe pas"); }
string t = "C:\" + textBox1.Text; if(Directory.Exists(t)) { Process.Start(t); } else { MessageBox.Show("Le dossier n'existe pas"); }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question