Visual Studio .NET - activex control and exe

Asked By alice wonder
30-Jan-08 04:15 PM

I have the scanner capability built in an windows app. I want to create activex control for this exe and use this in my aspx pages. Please suggest how to make activex control for this exe or any other alternative if available. I created the same project as a windows Control Library and have a dll also.

Thanks!

You cannot create an ActiveX control with C# or Visual Basic.net  You cannot create an ActiveX control with C# or Visual Basic.net

30-Jan-08 07:01 PM
There are some "tricks" you can do, but they involve some rather sophisticated programming techniques, and frankly, I wouldn't even begin to try them. You need to write an ActiveX control in Visual C++.

I created a windows Control Library  I created a windows Control Library

30-Jan-08 08:15 PM

I am trying to use the windows control Library .dll in aspx page. I am following this link http://aspnet.4guysfromrolla.com/articles/052604-1.aspx 

My application namespace is winapp and the class name is default one UserControl1.

<object id="myControl" name="myControl" classid="http:winapp.dll#winapp.UserControl1" width="100" height="100" >

<param name="Title" value="my title" />

</object>

I placed my dll and .pdb files at wwwroot folder. But I still get a blank object.

Thanks for your quick reply.

Windows handler on aspx  Windows handler on aspx

31-Jan-08 02:39 PM

I could make the Windows Control Library button to work on aspx page. by supplying the path copied to dll in the root folder. By doing this the button is palced on server, but how can I make it recognize the clients scanning device. Now it goes to the try catch block saying no scanning available.

Thanks!

That's wonderful, but you may be missing the point:  That's wonderful, but you may be missing the point:
31-Jan-08 02:44 PM
Yes you can host a windows usercontrol library in an ASP.NET page in the client's browser (assuming they have the .NET Framework installed). However, this does not give your userControl permissions to run programs on the client's machine. Browser security restrictions still apply. As I mentioned, the ONLY way you can gain permission to run a scan executable or any other program on a client machine from within the browser is to install an ActiveX control (That's COM)    and have the user grant permission to install it. A .NET userControl is NOT ActiveX!
OK thanks! Saved lot of time browsing  OK thanks! Saved lot of time browsing
31-Jan-08 03:09 PM

Thanks for the suggestion and quick reply. I will try to create an activeX control.

 

Creating Activex control tutorials  Creating Activex control tutorials
31-Jan-08 04:43 PM

Please guide me with some good links on how to create activex control. This is the 1st time I am trying to create one and all the links on web including MSDN are little confusing.

Thanks!

does this short cut of creating Activex control work  does this short cut of creating Activex control work
31-Jan-08 06:42 PM

http://foxsys.blogspot.com/2007/03/activex-controls-in-vs2005-and-c-part-1.html

http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx

I need to call only the Initialize() and start scanning() methods of twain from this user control. Can I make it an activex control like the one mentioned in the above links. Or do I need to create an activex control to detect the clients device.

Thnaks!

Well the first article does not create an ActiveX control  Well the first article does not create an ActiveX control
31-Jan-08 07:36 PM

even though the author claims it is. It is only a UserControl with a "supposed" COM Interface.

The second article does create a real ActiveX control. You have a lot of studying to do - it's not just creating the control, you also have to learn how to package it in a CAB self-installer.

Create New Account
help
Visual Studio .net .NET Framework Hi NG, ich habe vor längerer Zeit mit Visual Studio .Net 2003 gearbeitet und überlege momentan auf einen neueren Stand upzudaten. Ein Visual Studio .Net 2008 scheint es nicht zu geben. Habe zumindest mit googeln nichts gefunden. Was
Visual Studio versioning . . . . how to tell? .NET Framework To my knowledge, Visual studio 6 was released in 1998, then Visual Studio .NET 2002 is VS 7, then Visual Studio .NET 2003 is VS 7.1, then Visual
visual studio.net 2003 and Access 2007 database .NET Framework Hi I am currently using Visual Studio.Net 2003 running on Windows Server 2000 operating system. I have used Visual Studio.net 2003 connecting to Access 2002 databases in the pass with great success. Now
Is Visual Studio self-hosting ? .NET Framework Does Microsoft use Visual Studio IDE, Visual Studio Debugger, Visual Studio Linker and Visual Studio compiler for developing Visual Studio ? Or is Visual Studio not
Wise for Visual Studio.NET Wise for Visual Studio.NET By Peter A. Bromberg, Ph.D. To "Print This Page" Link Peter Bromberg Wise for Visual Studio .NET is a total and complete installation development system for creating and editing Windows® Installer