I would guess that the EfilmObj is an ActiveX viewer.
You could convert your VB code to VBScript with no difficulty, since late
binding is the method of Object creation and simply call the VBS file from
RBase using the "Launch" command. To take it a step further, you can store
the VBS file in a VarChar data field in the database and retrieve it, write
it to disk and run it, deleting it after the run, to keep the file from
anyone fooling with the source code.
If you aren't familiar with scripting, the main difference in VBScript is
all variables are Variants, so when you do variable declaration, you omit
the "as DataType" assignment.
----- Original Message -----
From: "Luc Delcoigne" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Wednesday, June 09, 2010 10:18 AM
Subject: [RBASE-L] - OLE 2 in rbase ?
Hello again,
in the database that I am converting from Access to R:BAse 9.0 we have a
procedure that links our database with Efilm X-ray filmviewer.
This is the procedure :
Public Sub Efilm()
Dim EfilmObj As Object
Dim var As Boolean
Dim varefilm As Boolean
Dim vpatID As String, vcon As String, bCloseCurWindow As Boolean,
bAddToWindow As Boolean, nSeriesRows As Integer, nSeriesCols As Integer,
nImageRows As Integer, nImageCols As Integer, bAutoSeriesFormat As Boolean,
bAutoImageFormat As Boolean
Set EfilmObj = CreateObject("Efilm.Document")
vpatID = Forms![InterfaceNieuw]![Patiƫnten].Form![Punieknummer]
vcon = Forms![InterfaceNieuw]![Consultatie].Form![Consultnummer]
bCloseCurWindow = True
bAutoSeriesFormat = False
bAutoImageFormat = False
nSeriesRows = 1
nSeriesCols = 2
nImageRows = 1
nImageCols = 1
varefilm = EfilmObj.oleOpenStudy(vpatID, vcon, bCloseCurWindow,
bAddToWindow, nSeriesRows, nSeriesCols, nImageRows, nImageCols,
bAutoSeriesFormat, bAutoImageFormat)
varefilm = EfilmObj.oleSetForegroundWindow
End Sub
How could I get the same functionality in R:base to link to Efilm and
automatically open all the required film-documents based on the
'Punieknummer' and the 'Consultnummer' ?
Many, many, many thanks
;-)
Luc Delcoigne