c# - How know when a winform is loaded by Process.Start? -
I am in a WindowsForm (c # .net 3.5) and launch another external application on the click of a button (this Also .net 3.5) Process. Understand using Start () and when to start it. PsInfo.RedirectStandardOutput = True; PsInfo.RedirectStandardError = True; PsInfo.UseShellExecute = false; PsInfo.CreateNoWindow = True; Process proc = process Start (psInfo); Proc ... IsFullyLoaded ()?
How can I do this?
Call the method of making your form.
To know whether it is ready or not, try it:
bool isReady = proc.WaitForInputIdle (0);
Or, alternatively,
bool isReady = (proc.MainWindowHandle! = IntPtr.Zero);
You can also use the main windhands property to send messages in the form using the API function
Comments
Post a Comment