473,396 Members | 1,996 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,396 software developers and data experts.

Can I use C# to build ActiveX control?

Hi, all.

I am a beginner. If C# can not be used to ActiveX control, How can I do?
Thank you in advance.
Nov 15 '05 #1
3 4557
You can't... if you're using VS.Net, you can create an ActiveX control via
C++'s MFC ActiveX Wizard...

You can, however, use an ActiveX control inside a C# application. The VS.Net
creates an interop DLL, which allows the unmanaged code to communicate with
the .Net IL.

hope that helps.
Dan.

"seaweed" <xi*****@is.aist-nara.ac.jp> wrote in message
news:e9**************@TK2MSFTNGP11.phx.gbl...
Hi, all.

I am a beginner. If C# can not be used to ActiveX control, How can I do?
Thank you in advance.

Nov 15 '05 #2
You should never do it, and as such, here is a full article on how to do it:

http://www.codeproject.com/cs/miscct...etcontrols.asp

Enjoy
--
Sebastien Lambla
http://thetechnologist.is-a-geek.com/blog/
"seaweed" <xi*****@is.aist-nara.ac.jp> a écrit dans le message de news:
e9**************@TK2MSFTNGP11.phx.gbl...
Hi, all.

I am a beginner. If C# can not be used to ActiveX control, How can I do?
Thank you in advance.

Nov 15 '05 #3
C# is a language for the .NET platform which does not provide native
support for COM/ActiveX. Microsoft had many reasons for breaking
compatibility, but they did provide an interop layer you can go
through for COM objects. Unfortunately their is no backwards interop
for ActiveX.

Depending on you application you may can create .NET UserControl (this
is the .NET counterpart for an ActiveX control), unfortunately
UserControls do not support ActiveX containers (you can't embed your
..NET UserControl in an Office document), but they do support the
current version of Internet Explorer when the client has the .NET
Framework and Code Access Security configured to permit their
execution.

If you want to create an ActiveX component you'll need Visual Basic 6
or Visual C++.

"seaweed" <xi*****@is.aist-nara.ac.jp> wrote in message news:<e9**************@TK2MSFTNGP11.phx.gbl>...
Hi, all.

I am a beginner. If C# can not be used to ActiveX control, How can I do?
Thank you in advance.

Nov 15 '05 #4

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

Similar topics

2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
1
by: Anand Kale | last post by:
How to have ActiveX control called from Web Form in ASP.Net ? ActiveX control is written using VC++/MFC/ATL-COM. Also kindly answer following issues, 1. Also how to take care of issues about...
3
by: Weston Fryatt | last post by:
Simple question I hope.... How do I send data to and from an ASP.Net (server side) web page to a ActiveX Control (client side) embedded in a web browser??? What I need to do, is I have image...
0
by: pagates | last post by:
Hello, I use a COM-based ActiveX control as part of a C# Controls project. Part of this control is a ListView, and the ActiveX control has a property that returns the ListItems of this control....
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
1
by: Jayender | last post by:
Hi, I have an ActiveX control (to display the Images),I have added the reference of that in my web based applicaton .and added the ocx in my tool bar , but the viewer (activex component- ocx ) is...
6
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm trying to display .NET Custom Control (created using Inherited Control) on an ASPX page, but no luck. I already registered the Control to Global Assembly Cache through .NET Framework...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
7
by: Artie | last post by:
Hi, Our team have a web project which includes some C# ActiveX DLLs. On some developers' PCs, the code which calls methods in the ActiveX dll is succesful - no exceptions. On other PCs, the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.