Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

WebArticlesForumsFAQs
JavaScript
ASP
ASP.NET
WCF

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

Operating SysArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Lounge
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

  View Other Visual Studio .NET Posts   Ask New Question  Ask New Question With Power Editor

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!

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0
You cannot create an ActiveX control with C# or Visual Basic.net
Peter Bromberg replied to alice wonder on 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++.
Reply    Reply Using Power Editor
Peter Bromberg is a C# MVP, MCP, and .NET expert who has worked in banking, financial and telephony for over 20 years. Pete focuses exclusively on the .NET Platform, and currently develops SOA and other .NET applications for a Fortune 500 clientele. Peter enjoys producing digital photo collage with Maya,playing jazz flute, the beach, and fine wines. You can view Peter's UnBlog and IttyUrl sites.
Please post questions at forums, not via email!
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

I created a windows Control Library
alice wonder replied to Peter Bromberg on 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.

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

Windows handler on aspx
alice wonder replied to Peter Bromberg on 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!

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

That's wonderful, but you may be missing the point:
Peter Bromberg replied to alice wonder on 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!
Reply    Reply Using Power Editor
Peter Bromberg is a C# MVP, MCP, and .NET expert who has worked in banking, financial and telephony for over 20 years. Pete focuses exclusively on the .NET Platform, and currently develops SOA and other .NET applications for a Fortune 500 clientele. Peter enjoys producing digital photo collage with Maya,playing jazz flute, the beach, and fine wines. You can view Peter's UnBlog and IttyUrl sites.
Please post questions at forums, not via email!
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

OK thanks! Saved lot of time browsing
alice wonder replied to Peter Bromberg on Thursday, January 31, 2008 3:09 PM

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

 

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

Creating Activex control tutorials
alice wonder replied to Peter Bromberg on 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!

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

does this short cut of creating Activex control work
alice wonder replied to Peter Bromberg on 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!

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

Well the first article does not create an ActiveX control
Peter Bromberg replied to alice wonder on 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.

Reply    Reply Using Power Editor
Peter Bromberg is a C# MVP, MCP, and .NET expert who has worked in banking, financial and telephony for over 20 years. Pete focuses exclusively on the .NET Platform, and currently develops SOA and other .NET applications for a Fortune 500 clientele. Peter enjoys producing digital photo collage with Maya,playing jazz flute, the beach, and fine wines. You can view Peter's UnBlog and IttyUrl sites.
Please post questions at forums, not via email!
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0