Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Visual Basic 2005 codes for using ActiveX supplied by Jobin Yvon Spectrometer (iHR320)

$
0
0

I am writing VB2005 codes using calling the ActiveX (COM) components for the spectrometer iHR320.

Usually calling com object resulted in some control in remotely connected iHR320 successfully.

But in my case, some ActiveX call results in OnReceive-like events that must be

caught in a sub-procedure written in main body of form (not in COM object source).

 

JY provided example source codes in VB6. Therefore, as long as using

the VB6 compiler, the iHR320 can be controlled successfully.

 

Previously when I used VB6, writing some subprocedure like

 

Private Sub Objects_Initialize(ByVal e As Long......)

can catch this event fired by ActiveX.

 

Private Sub Objects_Initialize(ByVal e As Long......)

Objects.GetSlitWidth()

.....

End Sub

 

But, it's not possible to catch in VB2005. I tried to add "handles ....." after

the finishing paraenthis of the subproc arguments, but it was in vain.

 

Private Sub  Objects_Initialize(ByVal e As Long......) handles Objects.Initialize

 

 

How should I do to work around. I tried to have questions to Jobin Yvon,

but there is no response.

 

I heard that it corresponds to "OnReceive" eventhanlder in the language of c++.

 

Please share your successful experience about the migration from VBb related to

the connection with ActiveX (COM) objects. I am expecting responses

from those who is familiar with VB2005 as weol as C++.

 

LabView is too expensive for me. It is not option for me.

 

Thanks in advance fro your kind response.


Viewing all articles
Browse latest Browse all 5565

Trending Articles



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