Dim bzhao
Sub Sglw2hcm1_AfterConnect( Success )
bzhao.MsgBox "Session connected to host.", 64
End Sub
Sub Sglw2hcm1_AfterDisconnect( Success )
bzhao.MsgBox "Session disconnected from host.", 64
End Sub
Sub Sglw2hcm1_OnBlueZoneEvent( eventNumber, eventData )
if eventNumber = 1 then
bzhao.MsgBox "Choice found at 23, 7", 64
end if
End Sub
Sub Form1_OnActivate()
set bzhao = CreateObject("BZWhll.WhllObj")
bzhao.SetBrowserWnd window.top ' provide browser window handle, used to identify embedded session
bzhao.Pause 1 ' give .ocx time to launch session and attach to browser
bzhao.setHostURL 0, 0, "locis.loc.gov" ' set host address; 0 Mainframe Display, 0 Embedded Session, Host Address
bzhao.connectToHost 0, 0 ' connect session to host; 0 Mainframe Display, 0 Embedded Session
bzhao.Connect "!" ' connect automation object to session; ! current embedded session
bzhao.OnEvent 1, rcDisplayString, "RaiseControlEvent 1", rcEnable, rcEventReenable, "Choice", 23, 7
End Sub
Note
If using the Host Automation Object to set the host address and connect the session to the host system, then the profile (BlueZone
configuration file) used to launch the session specified in the Object Tag of the web page must have the check box disabled.