Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion xml/System.Diagnostics/Process.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,9 @@ The calling process is a member of the associated process' descendant tree.</exc
<format type="text/markdown"><![CDATA[

## Remarks
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.
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 ("").

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.

> [!NOTE]
> 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.
Expand Down