| activex control and exe |
| alice wonder posted at Wednesday, January 30, 2008 4: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 |
| Peter Bromberg replied to alice wonder at Wednesday, January 30, 2008 7: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 |
| alice wonder replied to Peter Bromberg at Wednesday, January 30, 2008 8: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 |
| alice wonder replied to Peter Bromberg at Thursday, January 31, 2008 2: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: |
| Peter Bromberg replied to alice wonder at Thursday, January 31, 2008 2: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 |
| alice wonder replied to Peter Bromberg at Thursday, January 31, 2008 3:09 PM |
Thanks for the suggestion and quick reply. I will try to create an activeX control.
|
 |
| |
| Creating Activex control tutorials |
| alice wonder replied to Peter Bromberg at Thursday, January 31, 2008 4: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 |
| alice wonder replied to Peter Bromberg at Thursday, January 31, 2008 6: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 |
| Peter Bromberg replied to alice wonder at Thursday, January 31, 2008 7: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. |
 |
| |
|
|