elfstoneUK
Programmer
Hi,
I need some help with instantiating obects in EXTRA! 7.11 and VB.NET. I have been trying to use the examples in EXTRA! Enterprise (Marco Editor) help files. As suggested by the help line. The problem is that the project is running with Option Strict On (Strict type checking) but the examples given are not; it's simply VB6 code!
For example I want to check the status of the XClock. From the help files:
and then I type "MyScreen.OIA.XStatus" and then build up a Select Case or If... ElseIf... End If block.
But we can't use "Set" in VB.NET. The equivalent VB.NET code, which I worked out, looks like this:
*** Remember, Option Strict is set to On ***
Does anyone know if I'm correct here?
If we type "MyScreen" then the "." we get the dropdown and can select "OIA" but if you type "." again you don't get "XStatus". What you get is "GetType" only.
So there is NO "XStatus" in the dropdown object list.
How can I get at the XClock method?
Can anyone help me here, please?
I need some help with instantiating obects in EXTRA! 7.11 and VB.NET. I have been trying to use the examples in EXTRA! Enterprise (Marco Editor) help files. As suggested by the help line. The problem is that the project is running with Option Strict On (Strict type checking) but the examples given are not; it's simply VB6 code!
For example I want to check the status of the XClock. From the help files:
Code:
Dim Sys As Object
Dim Sess As Object
Dim MyScreen As Object
' This gets the System object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
Set MyScreen = Sess.Screen
But we can't use "Set" in VB.NET. The equivalent VB.NET code, which I worked out, looks like this:
Code:
Sys = CType(CreateObject("EXTRA.System"),EXTRA.ExtraSystem)
Sess = CType(oSys.Sessions, EXTRA.ExtraSessions)
Ses=CType(oSess.Open("C:\Session1.EDP"),EXTRA.ExtraSession)
MyScreen = CType(oScr.OIA, EXTRA.ExtraScreen)
Does anyone know if I'm correct here?
If we type "MyScreen" then the "." we get the dropdown and can select "OIA" but if you type "." again you don't get "XStatus". What you get is "GetType" only.
So there is NO "XStatus" in the dropdown object list.
How can I get at the XClock method?
Can anyone help me here, please?