Please, good evening, somewhere knows How can I do to create a ActiveX control in C# with Visual Studio?
I need to check a SQL DataBase and after I need show the data in DataGridView.
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Please, good evening, somewhere knows How can I do to create a ActiveX control in C# with Visual Studio?
I need to check a SQL DataBase and after I need show the data in DataGridView.
@renatojoaquimdutra: Is this ActiveX control for use on web pages? If so, you probably shouldn't be using ActiveX controls unless there's absolutely no other way to do what you're doing, and even then developing them with .Net is a really bad idea.
If this is not meant for the web, maybe it would help if you try to explain more what you're doing so we can offer more specific help.
@renatojoaquimdutra: You don't. VB6 was the last IDE that supported creating ActiveX controls.
But what you want can easily be done using .NET. Windows Forms or WPF on the desktop; Web Forms or MVC in the browser.
There also exists an Interop Toolkit from Microsoft that adds some project templates for you to expose your .NET forms and controls to COM. We use that at my company to host .NET controls inside of a VB6 MDI application.
33 minutes ago, spivonious wrote
@renatojoaquimdutra: You don't. VB6 was the last IDE that supported creating ActiveX controls.
Not true - you can quite happily create COM objects and ActiveX objects in VS2010, via MFC and C++. You can even do it in 2012.
@Sven Groot: So, I work with industrial automation and I use a supervisory software. This software allows to use the ActiveX to connect with SQL Database. I would like to do a activeX in C Sharp using Visual Studio, in this ActiveX I would like to do a query in SQL database with filter for date (for example). I'm studying a lot of books about Visual Studio and CSharp but I don't know How can I do to create the activeX in Visual Studio. I was studying ADO.NET class because has a things about database connection.
Of course you're correct. I have VB on the brain. ![]()
C# does not support ActiveX directly. Try out the Interop Forms Toolkit. http://www.codeproject.com/Articles/18954/Interop-Forms-Toolkit-2-0-Tutorial
16 hours ago, renatojoaquimdutra wrote
@Sven Groot: So, I work with industrial automation and I use a supervisory software. This software allows to use the ActiveX to connect with SQL Database. I would like to do a activeX in C Sharp using Visual Studio, in this ActiveX I would like to do a query in SQL database with filter for date (for example). I'm studying a lot of books about Visual Studio and CSharp but I don't know How can I do to create the activeX in Visual Studio. I was studying ADO.NET class because has a things about database connection.
do they support any other way to connect to a data source ??
AX just to do that seems like a not very good way to do it.
Add your 2¢