i got mdichild working. i am using withevents procedure. the message is
not getting through richtextbox. but i can see debug window .
here is code:
class1.vb:
Public Sub New(ByVal mParent As mainPirateChat)
m_parent = mParent
_Connection = New ConnectionFactory
nStatus = New frmStatus
nStatus.MdiParent = m_parent
nStatus.Show()
End Sub
Public Sub New(ByVal mparent As mainPirateChat, ByVal szChannel
As String)
szTag = szChannel
m_parent = mparent
Me.NewChannel(m_parent, szChannel)
End Sub
Delegate Sub OneArgSub(ByVal rtb As RichTextBox, ByVal szText As
String, ByVal szColour As String, ByVal szNum As Integer)
Public deleg As OneArgSub
Private Sub _Connection_onChanMsg(ByVal szNick As String, ByVal
szChannel As String, ByVal szText As String) Handles _Connection.onChanMsg
nChan = New frmChannel
deleg = New OneArgSub(AddressOf DisplayMessage)
deleg.Invoke(nChan.rtbChannel, "<" & szNick & "> " &
szText.ToString(), GetUserColours.colourChat, 11)
Debug.WriteLine("M :" & szText)
End Sub
Private Sub _Connection_onNickJoin(ByVal szNick As String, ByVal szHost
As String, ByVal szChannel As String) Handles _Connection.onNickJoin
Debug.WriteLine("joined :" & szTag & " " & szNick & " " &
szHost & " " & szChannel)
nChan = New frmChannel
nChan.Text = szTag
nChan.lstNames.Items.Add(szNick)
nChan.Text = szTag.ToLower & " [" &
nChan.lstNames.Items.Count & "]"
If szNick <> _Connection.Nick Then
deleg = New OneArgSub(AddressOf DisplayMessage)
deleg.Invoke(nChan.rtbChannel, "<" & szNick & "> " & "["
& szHost & "] " & " has joined " & szChannel.ToString(),
GetUserColours.colourJoin, 1)
End If
End Sub
u can see in debug.writerline:
M :looooooooooool
Ex*************@163.121.174.87 PRIVMSG #usa :looooooooooool
joined :#usa diana-- !~********@203.175.254.38 #usa
diana--!~********@203.175.254.38 JOIN :#usa
why is that not not getting tru richtextbox.
regards,