Quantcast
Channel: VBForums - COM and ActiveX
Viewing all articles
Browse latest Browse all 62

Upgrading VB6 project that has many custom ActiveX controls

$
0
0
Hello
I work in a scientific research lab, which is in the process of upgrading its control software from vb6 to vb.net. The software has a lot of custom ActiveX controls, written either by manufacturers or ourselves to control the equipment in the lab. The software consists of many modules, all implemented in the same fashion: (1) an interface that has only function definitions (like the header file in C), (2) different implementations of the interface, and (3) a GUI. The interface is compiled into a dll, the implementations into ActiveX controls, and the GUI is just a VB6 form. My question is: what is the best way to upgrade a project like this?

I just upgraded one VB6 form using the upgrade wizard in VS 2008. The ActiveX control on the form seems to work fine, except when I try to close the form, the program crashes. The error message is that the program referenced memory that could not be “read”. Is there any special thing to do with the ActiveX control before closing the form? Here is the code in the FormClosed() method. "theScan" is a custom ActiveX control on the form.

Private Sub LineScanForm_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

If (theScan.isScanRunning) Then
Call theScan.stopScan()
End If

End sub

Thanks so much for your help.

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>