public string LancerFormControl(string stThisPathFC) { string stReturnError = "Pas d'erreur"; Process ProcessFC = new Process(); int iProcID = 0; int iProcHandle = 0; try { ProcessFC.StartInfo = new ProcessStartInfo("calc.exe"); ProcessFC.Start(); iProcHandle = ProcessFC.Handle.ToInt32(); iProcID = ProcessFC.Id; SendMessage(iProcHandle, 0x111, 304, 0); } catch (Exception exception) { stReturnError = exception.Message; } return stReturnError; }
public string LancerFormControl(string stThisPathFC) { string stReturnError = "Pas d'erreur"; Process ProcessFC = new Process(); int iProcID = 0; int iProcHandle = 0; int iUseLess = 0; try { ProcessFC.StartInfo = new ProcessStartInfo("calc.exe"); ProcessFC.Start(); iProcHandle = ProcessFC.MainWindowHandle.ToInt32(); iProcID = ProcessFC.Id; SendMessage(iProcHandle, 0x111, 304, iUseLess); } catch (Exception exception) { stReturnError = exception.Message; } return stReturnError; }
do { iProcHandle = ProcessFC.MainWindowHandle.ToInt32(); iProcID = ProcessFC.Id; } while (iProcHandle != 0);
private void button1_Click(object sender, EventArgs e) { Process p = Process.Start("calc.exe"); p.WaitForInputIdle(); IntPtr hWnd = p.MainWindowHandle; SendMessage(hWnd, 0x111, 304, 0); // SendMessage(hWnd, 0x111, 305, 0); Mode standard }
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.