Bonjour à tous,
J'essaie de lancer un programme externe à partir d'une winform.
Pas de problème pour lancer, par exemple notepad++ :
Ca marche nikel. Je souhaiterai maintenant avoir notepad++ qui tourne mais intégré dans ma form (dans un panel ou un autre container par exemple).
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public void lauchNotePad() { try { p = null; string targetDir; targetDir = string.Format(@"C:\Program Files\Notepad++"); p = new Process(); p.StartInfo.WorkingDirectory = targetDir; p.StartInfo.FileName = "nppIExplorerShell.exe"; p.StartInfo.CreateNoWindow = true; p.Start(); p.WaitForExit(); } catch (Exception ex) { MessageBox.Show("Erreur : "+ex.ToString(), "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
Je ne sais pas si cela est possible...
J'ai aperçu la fonction setParent ici mais
je n'ai pas trop compris l'exemple. De plus je n'arrive pas à trouver la doc de setParent dans la doc msdn.
Si quelqu'un un a lien sur la doc ou un bout de code bien commanté ce serait nikel!
Merci d'avance.
Partager