PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Convert VB6 ActiveX Control to VB.NET And Incorporate it Into ASPX

 
 
Jay Chan
Guest
Posts: n/a
 
      11th May 2011
I have an existing ASP.NET application that is written mainly in
VB.NET. Currently one of the ASPX form has an ActiveX control on it.
The ActiveX control is a Windows.Form written in VB6. Inside that
ActiveX control, it has an old third party ActiveX control embedded in
it. In other words, we have a Windows-Form ActiveX wraps around
another ActiveX control.

I would like to convert that ActiveX control from VB6 to VB.NET in
order to bring everything to the same .NET platform and also to
simplify debugging.

I have already converted the VB6 ActiveX control to VB.NET using
Upgrade Wizard in Visual Studio 2003. The problem is that Visual
Studio 2003 cannot create Windows.Form ActiveX wrapper. It can only
convert the VB6 ActiveX into a DLL class library (not a control). I
cannot use the converted DLL into the ASPX web form because the DLL is
not a control.

I know one of the solution is to upgrade to the new version of Visual
Studio. But I am not ready to make the switch just yet because I am
just newly assigned to maintain that application and I understand the
application better before I make any significantly change on the
application.

According to chapter 10 in the Microsoft document "Upgrading Visual
Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005",
there are three ways to deal with the VB6 ActiveX control:

1. It can be left as a VB6 ActiveX control, and use Interoperability
to run it in aspx. Somehow I cannot step through the source code of
the VB6 ActiveX wrapper if I keep it in VB6. I know that there are
some tips that are supposed to allow me to debug into VB6 ActiveX,
such as building the VB6 ActiveX with no optimization, including
symbolic info, and ask the debugger to debug into "unmanaged code".
Somehow, none works. I cannot debug into the VB6 ActiveX. That was
one of the reason why I want to convert the VB6 ActiveX into VB.NET --
hopefully I will be able to step through the source code.

2. It can be changed into an aspx (web form). This would be a good
solution if I was not using an old third party ActiveX control inside
the Windows.Form wrapper. Unfortunately, somehow I cannot get the old
third party ActiveX control to expose its events inside the aspx.vb
(that is converted from the VB6 ActiveX). Therefore, I cannot add
event handlers to work with the third party ActiveX control. May be I
am missing something very basic. May be I can handle its events using
JScript ot VBScript instead of inside aspx.vb. But I don't know how
to do this.

3. It can be changed into a Windows.Form control. But the document
doesn't tell me how to do this. If this works, this is probably the
most direct way because the original VB6 ActiveX is also a
Windows.Form wrapper. Any idea of how to do this?

Please help. Thanks.

Jay Chan
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert EXE to ActiveX Control =?Utf-8?B?QW51Ymlz?= Microsoft Dot NET Framework 2 21st Aug 2010 03:32 PM
ActiveX Control prompt "An ActiveX control on this page might be u =?Utf-8?B?UmFodWw=?= Windows Vista General Discussion 2 1st Aug 2006 05:08 PM
Access inherited aspx control from base aspx ? Jeff User Microsoft ASP .NET 3 2nd Dec 2005 04:58 AM
No suggestions why ActiveX control on a aspx page won't D/L on XP? Joe Microsoft ASP .NET 3 30th Jun 2004 04:42 PM
Convert VB 6 ActiveX control to .net Mike Kanski Microsoft VB .NET 1 29th Jun 2004 06:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:23 AM.