How to create C# Control for any language
-
Hi all, How to create a C# control (using VC# 2008 .Net) which can be used in any language (mainly in VC++ 2008 .Net)? Please guide me. I appreciate any and all comments and suggestions. Thanks in advance. Regards, Aniket A. Salunkhe
What is a C# control? If you build a library using C#, then all public classes in that library can be consumed by any of the .NET languages.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi all, How to create a C# control (using VC# 2008 .Net) which can be used in any language (mainly in VC++ 2008 .Net)? Please guide me. I appreciate any and all comments and suggestions. Thanks in advance. Regards, Aniket A. Salunkhe
Any control you create in C#, or even VB.NET, can be used by the other .NET languages. You have to add a reference to the .dll containing your control.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Any control you create in C#, or even VB.NET, can be used by the other .NET languages. You have to add a reference to the .dll containing your control.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Hi, Thanks to you both for reply.
Paul Conrad wrote:
can be used by the other .NET languages
I am using VC++.Net 2008, but I am doing MFC Application.
Paul Conrad wrote:
add a reference to the .dll containing your control
How to add reference to .dll in MFC Application using VC++.Net 2008? And even after adding reference in MFC Application, how to add/use custom ActiveX Control? Scenario is, ActiveX Control in VC#.Net 2008 as 'Windows Form Control Library'. Application in VC++.Net 2008 as 'MFC Application' (as I am doing DirectShow programming in it). When I try to add my ActiveX Control through 'Insert ActiveX Control', it doesn't show it in that list. When I try to register the control using 'regsvr32.exe' it shows error as, DllRegisterServer Failed Thanks & Regards, Aniket A. Salunkhe
modified on Friday, September 19, 2008 3:32 AM
-
What is a C# control? If you build a library using C#, then all public classes in that library can be consumed by any of the .NET languages.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi, Thanks to you both for reply.
Paul Conrad wrote:
can be used by the other .NET languages
I am using VC++.Net 2008, but I am doing MFC Application.
Paul Conrad wrote:
add a reference to the .dll containing your control
How to add reference to .dll in MFC Application using VC++.Net 2008? And even after adding reference in MFC Application, how to add/use custom ActiveX Control? Scenario is, ActiveX Control in VC#.Net 2008 as 'Windows Form Control Library'. Application in VC++.Net 2008 as 'MFC Application' (as I am doing DirectShow programming in it). When I try to add my ActiveX Control through 'Insert ActiveX Control', it doesn't show it in that list. When I try to register the control using 'regsvr32.exe' it shows error as, DllRegisterServer Failed Thanks & Regards, Aniket A. Salunkhe
modified on Friday, September 19, 2008 3:32 AM
Aniket Salunkhe wrote:
How to add reference to .dll in MFC Application using VC++.Net 2008? And even after adding reference in MFC Application, how to add/use custom ActiveX Control?
That's really fun. I suggest you google that one, it's involved and there's articles how to achieve it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Hi, Thanks for reply.
Mark Salsbery wrote:
consumed by any of the .NET languages.
I want to add my 'Windows Form Control Library' (i.e. VC#.Net 2008 ActiveX Control) in my MFC Application of VC++.Net 2008. Thanks & Regards, Aniket A. Salunkhe
Aniket Salunkhe wrote:
i.e. VC#.Net 2008 ActiveX Control
I don't know about ActiveX controls, but an ActiveX control written in c# should work just like any other ActiveX control... that's what they're designed to do :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Aniket Salunkhe wrote:
i.e. VC#.Net 2008 ActiveX Control
I don't know about ActiveX controls, but an ActiveX control written in c# should work just like any other ActiveX control... that's what they're designed to do :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Aniket Salunkhe wrote:
i.e. VC#.Net 2008 ActiveX Control
I don't know about ActiveX controls, but an ActiveX control written in c# should work just like any other ActiveX control... that's what they're designed to do :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Hi all, I found something to work with MFC application, http://msdn.microsoft.com/en-us/library/b1kyh79x.aspx[^] Thanks for your support too. Now I am trying to integrate it with my MFC Application & Control, as I want to add mutiple control dynamically in MFC Dialog. But I appreciate any other better suggestions. Thanks & Best Regards, Aniket A. Salunkhe
-
Hi all, I found something to work with MFC application, http://msdn.microsoft.com/en-us/library/b1kyh79x.aspx[^] Thanks for your support too. Now I am trying to integrate it with my MFC Application & Control, as I want to add mutiple control dynamically in MFC Dialog. But I appreciate any other better suggestions. Thanks & Best Regards, Aniket A. Salunkhe
I guess I'm confused - do you need an ActiveX control or a Windows Forms control?
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I guess I'm confused - do you need an ActiveX control or a Windows Forms control?
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Mark Salsbery wrote:
ActiveX control or a Windows Forms control
What is difference between these 2? I want to create a UserControl in C#. eg Analog Clock Control in C# with some properties.
ActiveX controls are OLE (COM) objects. Windows Forms controls are based on classes in the System.Windows.Forms namespace of the .NET framework. There's tons of documentation on creating and using both... Introduction to ActiveX Controls[^] Developing Custom Windows Forms Controls with the .NET Framework[^]
Mark Salsbery Microsoft MVP - Visual C++ :java: