Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / November 2004

Tip: Looking for answers? Try searching our database.

How to use a .NET Control with GUI in VC++/MFC/COM/VB applications

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ramchandra Hegde - 24 Nov 2004 11:55 GMT
We need to use a previously developed .NET application with a existing
VC++/MFC application. Idea is to convert the .NET application to an ActiveX
control which can be inserted in the ActiveX Container Application. However
there seems to be no way to do this.
A .NET component without a GUI can be used by COM application, but there is
no mention of the control with a GUI. Anyone has any idea how to do this?
pmoore - 24 Nov 2004 19:25 GMT
the supported mechanism is to host the control inside IE and then host IE in
your app
for the unsupported way see adam nathan com interop book p 471

> We need to use a previously developed .NET application with a existing
> VC++/MFC application. Idea is to convert the .NET application to an ActiveX
> control which can be inserted in the ActiveX Container Application. However
> there seems to be no way to do this.
> A .NET component without a GUI can be used by COM application, but there is
> no mention of the control with a GUI. Anyone has any idea how to do this?
Eckhard Schwabe - 26 Nov 2004 17:40 GMT
Hello Ramchandra,

Ramchandra Hegde schrieb:
> We need to use a previously developed .NET application with a existing
> VC++/MFC application. Idea is to convert the .NET application to an ActiveX
> control which can be inserted in the ActiveX Container Application. However
> there seems to be no way to do this.
> A .NET component without a GUI can be used by COM application, but there is
> no mention of the control with a GUI. Anyone has any idea how to do this?

There is some code and an example at:
http://msdn.microsoft.com/msdnmag/issues/03/03/windowsforms/
"Managed Controls in Unmanaged Hosts"

the drawbacks are:
- the host has to be compiled as managed code
- this works with VC++ 2003 or newer
- it has to use MFC

But it seems to work. I could reproduce the example with my own C#
windows forms control.

Ecki

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.