Bonjour,
Je n'arrive pas à lancer une application en code behind.
Enfin, si, j'y arrive, mais elle s’exécute en tache de fond, elle est présente dans la liste des processus mais elle n’apparait pas à l’écran.
Je me suis fait les dents sur pas mal de solutions (j'ai essayé sur le bloc notes et la calculette), mais rien n'y fait:
Est ce que quelqu'un peut m'aider ?
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
21
22
23
24
25
26
27
28
29
30
31
32 /*Process p = new Process(); p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.FileName = @"C:\WINDOWS\system32\notepad.exe"; //p.StartInfo.Arguments = "192.168.1.1"; p.Start(); while (!p.StandardOutput.EndOfStream) { Console.WriteLine(p.StandardOutput.ReadLine()); } // */ /*ProcessStartInfo psi = new ProcessStartInfo() { FileName = src, // @"C:\windows\system32\notepad.exe", }; Process process = Process.Start(psi); while (process.MainWindowHandle == IntPtr.Zero) { // Wait until the process has a main window handle. process.Refresh(); } ShowWindow(process.MainWindowHandle, 1); // */ /*Process myProcess = new Process(); /*myProcess.StartInfo.UseShellExecute = true; myProcess.StartInfo.FileName = src; myProcess.StartInfo.CreateNoWindow = false; myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal; myProcess.Start(); // */ /*System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("\"" + src + "\"", ""); // -enc \"UTF-8\" \"" + chemFic + "\" \"" + chemRep + nomFicTmp + "\" info.RedirectStandardOutput = true; info.UseShellExecute = false; info.CreateNoWindow = false; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); // Démarrer le processus
Partager