views:

300

answers:

4

Does a C++ Windows Forms Application require .NET Framework?

It seems that it does because it imports "System::Forms" but I just want be 100% sure. I tried opening it with depends and it looks like it imports the usual C++ dll's but there is nothing about the framework.

+1  A: 

By defnition, anything classified as Windows Forms requires the .NET Framework, yes.

From Wikipedia:

Windows Forms is the name given to the graphical application programming interface (API) included as a part of Microsoft's .NET Framework,

Andy West
+3  A: 

Yes if you are doing .Net Windows forms development as opposed to say Windows with MFC.

Andrew
+5  A: 

Windows Forms are part of the .NET Framework, so yes.

If you don't want the .NET framework as a dependency you need to use native Win32 API or MFC. You could also use a third party library like Trolltech's Qt.

Dependency Walker has a good FAQ that covers why:

Will Dependency Walker work with COM, Visual Basic, or .NET modules?

Yes. Dependency Walker will work with any 32-bit or 64-bit Windows module, regardless of what language was used to develop it. However, many languages have their own way to specify dependency relationships between modules. For example, COM modules may have embedded type libraries and registration information in the registry, and .NET modules may use .NET assemblies. These techniques are all implemented as layers above the core Windows API. In the end, these layers still need to call down to the core Windows functions like LoadLibrary and GetProcAddress to do the actual work. It is at this core level that Dependency Walker understands what is going on. So, while Dependency Walker may not understand all the language specific complexities of your application, it will still be able to track all module activity at a core Windows API level.

Brian R. Bondy
A: 

You can use native windows with the Windows API from C or C++ and avoid the need for the .NET framework

Power-Mosfet