Skip to content

Commit 3414320

Browse files
Patrick Kellystephentoubdanmoseley
authored
Update Process.xml (#3844)
* Update Process.xml Added clarification about MainWindowTitle on Unix, with respect to dotnet/runtime#31658 * Update xml/System.Diagnostics/Process.xml Co-Authored-By: Stephen Toub <[email protected]> * Update xml/System.Diagnostics/Process.xml Co-Authored-By: Dan Moseley <[email protected]> Co-authored-by: Stephen Toub <[email protected]> Co-authored-by: Dan Moseley <[email protected]>
1 parent 8657b16 commit 3414320

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xml/System.Diagnostics/Process.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,9 @@ The calling process is a member of the associated process' descendant tree.</exc
25012501
<format type="text/markdown"><![CDATA[
25022502

25032503
## Remarks
2504-
A process has a main window associated with it only if the process has a graphical interface. If the associated process does not have a main window (so that <xref:System.Diagnostics.Process.MainWindowHandle%2A> is zero), <xref:System.Diagnostics.Process.MainWindowTitle%2A> is an empty string (""). If you have just started a process and want to use its main window title, consider using the <xref:System.Diagnostics.Process.WaitForInputIdle%2A> method to allow the process to finish starting, ensuring that the main window handle has been created. Otherwise, the system throws an exception.
2504+
A process has a main window associated with it only if the process has a graphical interface. If the associated process does not have a main window (so that <xref:System.Diagnostics.Process.MainWindowHandle%2A> is zero), or if the system can't determine that there's a main window (such as may be the case on some Unix platforms), <xref:System.Diagnostics.Process.MainWindowTitle%2A> is an empty string ("").
2505+
2506+
If you have just started a process and want to use its main window title, consider using the <xref:System.Diagnostics.Process.WaitForInputIdle%2A> method to allow the process to finish starting, ensuring that the main window handle has been created. Otherwise, the system throws an exception.
25052507

25062508
> [!NOTE]
25072509
> The main window is the window that currently has the focus; note that this might not be the primary window for the process. You must use the <xref:System.Diagnostics.Process.Refresh%2A> method to refresh the <xref:System.Diagnostics.Process> object to get the current main window handle if it has changed.

0 commit comments

Comments
 (0)