Subject: What is the equivalent invokerequired code for Matrix on message event in windows forms
I have used agsxmpp for a windows forms VB .net application and on the message receive event I have used the following standard code:
I am trying to replicate the same general functionality, e.g. not tied to a specific control on the form, for Matrix, but I am afraid I am lost. I cannot get an object line "MessageHAndler" in the Matrix collection.
Can you please suggest an alternative?
- Private Sub myXMPP_OnMessage(sender As Object, msg As Message) Handles XMPP.OnMessage
- If InvokeRequired Then
- BeginInvoke(CType(AddressOf myXMPP_OnMessage, MessageHandler), New Object() {sender, msg})
- Return
- End If
- 'use the msg to change any form element
- '.........
- end sub
I am trying to replicate the same general functionality, e.g. not tied to a specific control on the form, for Matrix, but I am afraid I am lost. I cannot get an object line "MessageHAndler" in the Matrix collection.
Can you please suggest an alternative?