How to: Open a Window
This example shows how to open a window.
Example
A window is opened by instantiating Window and calling the Show method. Show opens a window and returns immediately without waiting for the new window to close. This type of window is also known as a modeless window, and doesn't restrict user input.
CustomWindow window = new CustomWindow();
window.Show(); // Returns immediately
Dim window As New CustomWindow()
window.Show() ' Returns immediately
.NET Framework Security
Instantiating Window requires permission to call unsafe native methods (see Window).
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET Desktop feedback