Windows Forms and Unmanaged Applications
Windows Forms applications and controls can interoperate with unmanaged applications, with some caveats. The following sections describe the scenarios and configurations that Windows Forms applications and controls support and those that they do not support.
In This Section
- Windows Forms and Unmanaged Applications Overview
Offers general information about how to use and implement Windows Forms controls that work with unmanaged applications.
- How to: Support COM Interop by Displaying a Windows Form with the ShowDialog Method
Provides a code example that shows how to use the System.Windows.Forms.Form.ShowDialog method to run a Windows Form in an unmanaged application.
- How to: Support COM Interop by Displaying Each Windows Form on Its Own Thread
Provides a code example that shows how to run a Windows Form on its own thread.
- How to: Support COM Interop by Displaying Windows Forms on a Shared Thread
Provides a code example that shows how to run Windows Forms on a shared thread.
Reference
- System.Windows.Forms.Form.ShowDialog
Used to create a separate thread for a Windows Form.
- System.Windows.Forms.Application.Run
Starts a message loop for a thread.
- Invoke
Marshals calls from an unmanaged application to a form.
Related Sections
- Exposing .NET Framework Components to COM
Offers general information about how to use .NET Framework types in unmanaged applications.
- Advanced COM Interoperability
Offers general information about advanced concepts for using .NET Framework types in unmanaged applications.