Information Technology Reference
In-Depth Information
outputted by selecting option “COMObject” of option “Build”. Information of version,
methods, properties, events and interfaces of the module built are as shown in figure 4.
4.3 The Call of COM Modules
Create a new project under VisualBasic environment. Select “project→references” at
the menu bar. PCB 1.0 type library is added into the reference list. And then PCB-1-
0.DLL module can be called in Visual Basic programs. Partial call program codes of
COM modules in the VB program is as followings.
Private Sub Command1_Click()
Dim gh As PCB.PCB
Set gh = New PCB.PCB
Call gh.jc(4, a, b, c, d, App.Path & "\jlsy.jpg")
x = (a + b + c + d) \ 4
Print a
Print vbCrLf
Print b
Print vbCrLf
Print c
Print vbCrLf
Print d
Print vbCrLf
Print x
Print vbCrLf
End Sub
Simulated image jlsy.jpg of the PCB board is placed under the install catalogue of
the VB software, which provides a way for dispensing position identification in a real
environment afterwards. A button with Caption property “image processing” is placed
on the VB interface. Sobels operator [4] is mainly used in the processing of images.
Processing impressions can be obtained if the image processing button is pushed, as
shown in figure 5.
Fig. 5. Running result of the software
Search WWH ::




Custom Search