Files
docs-desktop/dotnet-desktop-guide/framework/winforms/advanced/windows-forms-and-unmanaged-applications.md
T

2.2 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
Unmanaged apps 03/30/2017
ActiveX controls [Windows Forms]
COM interop [Windows Forms], Windows Forms
COM [Windows Forms]
Windows Forms, unmanaged
Windows Forms, interop
81bc100c-fa49-4614-85a6-0f7ab59eac8a

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 xref:System.Windows.Forms.Form.ShowDialog%2A?displayProperty=nameWithType 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.

Also see Walkthrough: Supporting COM Interop by Displaying Each Windows Form on Its Own Thread.

Reference

xref:System.Windows.Forms.Form.ShowDialog%2A?displayProperty=nameWithType
Used to create a separate thread for a Windows Form.

xref:System.Windows.Forms.Application.Run%2A?displayProperty=nameWithType
Starts a message loop for a thread.

xref:System.Windows.Forms.Control.Invoke%2A
Marshals calls from an unmanaged application to a form.

Exposing .NET Framework Components to COM
Offers general information about how to use .NET Framework types in unmanaged applications.