J
Jay Chan
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
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