GefApplication.SessionID (read-only property)

Gets the WebView or ThinView session ID for this application.
Syntax: long = object.SessionID
Description: Ordinarily, this property returns 0. However, for WebView or ThinView clients, CimView uses a non-zero session ID to help maintain certain state information about the remote client.

This property allows you to retrieve the session ID associated with a particular CimView instance. Use this property if you need to check if a CimView instance is allocated to a WebView or ThinView client, or if you need to track or check whether a given CimView instance belongs to the same "session" as another, and therefore represents the same remote client.


Example:

Sub Application_SessionID()
    
    Dim oCimApp As GefApplication
    Set oCimApp = CimGetScreen.Application
    
    Select Case oCimApp.SessionID
        Case 0
            MsgBox "The screen is being viewed in CimView"
        Case Is <> 0
            MsgBox "The screen is being viewed in either " & _
                "WebView or ThinView."
    End Select
    
End Sub