Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Problem Using an Old 3rd Party ActiveX in VB.NET

Posted on 2011-05-09
2
Medium Priority
?
1,122 Views
Last Modified: 2012-06-27
We have an existing application written in ASP.NET.  It calls a ActiveX control that is written in VB6.  The VB6 ActiveX has a Window Form that has an old third party ActiveX control on it.  I have a problem stepping through the source code of the VB6 ActiveX control from the .NET program.  I believe one of the solution is to convert it from VB6 to VB.NET.  I have used the Upgrade Wizard in Visual Studio 2003 to convert the VB6 ActiveX to VB.NET.  But it cannot convert the event handlers that are supposed to handle the events coming from the third party ActiveX control.  I need help to get around with this problem.

The old third party AciveX control is called "Formula One 6.0" that provides a spreadsheet on a Window Form.  It used to be from TideStone.com.  But that company seems to be gone, and its web site no longer exists.  I need to find a way to work with it as best as I can.

Example 1, the event handler of the original VB6 ActiveX is this:

Private Sub F1Grid_StartEdit(EditString As String, Cancel As Integer)
   ...
End Sub

The VS 2003 Upgrade Wizard converts it into this:

Private Sub objF1Grid_StartEditEvent( _
   ByVal eventSender As System.Object, _
   ByVal eventArgs As AxTTF160.DF1Events_StartEditEvent) _
   Handles objF1Grid.StartEditEvent
   ...
End Sub

But it shows the following two errors:
1.  Type 'AxTTF160.DF1Events_StartEditEvent' is not defined.
2.  Event 'StartEditEvent' cannot be found.

Example 2, the event handler of the original VB6 ActiveX is this:

Private Sub objF1Grid_KeyDown(KeyCode As Integer, Shift As Integer)
   ...
End Sub

The VS 2003 Upgrade Wizard converts it into this:

Private Sub objF1Grid_KeyDown( _
   ByVal eventSender As System.Object, _
   ByVal eventArgs As System.Windows.Forms.KeyEventArgs) _
   Handles objF1Grid.KeyDown
   ...
End Sub

But it shows the following error:
-   Method 'objF1Grid_KeyDown' cannot handle Event 'KeyDown' because they do not have the same signature.

How can I fix these?  Please help.  Thanks.

Jay Chan
0
Comment
Question by:homerslmpson
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
homerslmpson earned 0 total points
ID: 35723100
Turns out this problem is caused by simple things:

1.  I didn't know enough to "Add Reference" to the third party ActiveX (as a COM).

2.  I didn't pay attention to the fact that the third party ActiveX control didn't show up in the Windows Form after the ActiveX form has been upgraded from VB6 to VB.NET.  This should be a dead giveaway that the Upgrade Wizard could not add the third party ActiveX control onto the Windows Form.  I manually added it to the Windows Form, and all the error messages are gone now.

Sorry for asking too soon.
0
 
LVL 1

Author Closing Comment

by:homerslmpson
ID: 35723110
I found where the problem was.

No one told me anything anyway.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question