VB unable to access main class objects

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VB unable to access main class objects

WayneGraham
Hi

I have created a simple Initiator that is connecting and logging in fine.

When I connect I am able to set a textbox text to the session_ID without problem from the OnCreate method as follows:

 Public Sub OnCreate(sessionID As SessionID) Implements IApplication.OnCreate
        _session = Session.LookupSession(sessionID)
        mainclass.OutputTB.Text = "On Create - " & _session.ToString
    End Sub

However, when I log in I am unable to access the textbox - code is as follows:

Public Sub OnLogon(sessionID As SessionID) Implements IApplication.OnLogon
        mainclass.OutputTB.Text = "Logged on"
        MsgBox("Logged On")
    End Sub

I get the messagebox coming up confirming that I am logged on, but I does not set the textbox text.

Can anyone tell me one method can access the mainclass and the other not

Thanks very much.

W