473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ActiveX UserControl

Dan
Good Day All,

I am in the process of migrating a VB6 application to .NET using C#. The VB6
application has a bunch of ActiveX user controls that it load dynamically
depending upon the situation at hand. I would like to be able to use these
controls initially until I have the time to migrate them to .NET. I know I
can add an ActiveX control to a WinForm during design time and it will
generate a Com Interop wrapper for me and it works great.

However, I am not sure how/if I can do this at run time. Right now the
controls implement a common interface and I can just create the object that I
need and display it to the user. Unfortunatley, I have not been able to get
these controls to behave that way using .NET. The only thing I have come up
with is to wrap each control in a .NET control, using Visual Studio, but I
really don't want to have to go through all of that work right now.

Can I do this? Any ideas, samples, suggetions would be appreciated.
Nov 17 '05 #1
1 2354
Hi Dan,

As far as I remember, you will need to create an interop assembly first with
TlbImp.exe.
Then, use AxImp.exe to create a wrapper .NET control for your OCX control.

Finally, reference the both assemblies from your .NET project and create the
generated wrapper control dynamically whenever appropriate.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

"Dan" <Da*@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
Good Day All,

I am in the process of migrating a VB6 application to .NET using C#. The
VB6
application has a bunch of ActiveX user controls that it load dynamically
depending upon the situation at hand. I would like to be able to use these
controls initially until I have the time to migrate them to .NET. I know I
can add an ActiveX control to a WinForm during design time and it will
generate a Com Interop wrapper for me and it works great.

However, I am not sure how/if I can do this at run time. Right now the
controls implement a common interface and I can just create the object
that I
need and display it to the user. Unfortunatley, I have not been able to
get
these controls to behave that way using .NET. The only thing I have come
up
with is to wrap each control in a .NET control, using Visual Studio, but I
really don't want to have to go through all of that work right now.

Can I do this? Any ideas, samples, suggetions would be appreciated.


Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BestNews | last post by:
OS: XP ..Net= framework = 1.0.3705 VS.Net IDE = 7.0.9466 1. I used an ActiveX control in C# client Application. After executing Aximp of ActiveX control. I derived a class from the AxHost.
0
by: Jeff M | last post by:
For my application an activeX refers to "program displayed within Internet Explorer" After looking over the docs for VB.NET it looks impossible. ---START--- USERCONTROL CHANGES IN VISUAL...
3
by: Neo | last post by:
I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security...
3
by: seaweed | last post by:
Hi, all. I am a beginner. If C# can not be used to ActiveX control, How can I do? Thank you in advance.
1
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
4
by: Captain Chaos | last post by:
Hello Is it Possible to build an ActiveX Control with NET ? I want to take a NET UserControl and use it with VB6. I found a solution how to embbed a NET UserControl into a WebPage (Like it...
7
by: Peter Proost | last post by:
Hi group, Here at work they've got an activeX control which is used on a usercontrol, and this usercontrol is one of the standard controls in the framework, so this user controls get's used a...
4
by: Michael | last post by:
Hi I know it sounds grazy to create an ActiveX Usercontrol with VB.NET, where a native tool for this already exists, VB6. The existing ActiveX Control Containers should be able to load...
3
by: unknown; | last post by:
Hi, i need to write a module in C++ (unmanaged) witch i can use in VB.NET. The C++ module doesn't have a GUI. In VB i need to create an instace of the C++ class. I understand the only way to do...
3
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.