473,379 Members | 1,191 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

which mdichild that user joined channel....

i got mdichild working. i'm working on similar to mirc chat. when i
joined channel #vb the first mdichild is on. then when i wanted to join
another channel #visualbasic. then i got second mdichild on. the first
mdichild(#vb) is stopped responding and all #vb goes into combination
of second mdichild(#visualbasic)... and in second mdichild i got both
responding from both #vb and #visualbasic intot second
mdichild(#visualbasic). but how do i get the first #vb goes into first
mdichild and secondly #visualbasic goes into second mdichild. if user
joined #vb that goes to first mdichild and if user joined #visaulbasic
that go to second mdichild all times.

in main form:
Shared Function NewChannel() As PirateChat.ClientFactory.CreateNewChannel
Dim s As String
Dim newFrmChannel As New
PirateChat.ClientFactory.CreateNewChannel(parentWi ndow, s)
Return newFrmChannel
End Function

Namespace PirateChat
Public Class ClientFactory

Public Class CreateNewChannel
Public Sub New(ByVal mparent As mainPirateChat,
ByVal szChannel As String)
End Sub

Shared Sub NewChannel(ByVal szChannel As String)
nChan = New frmChannel
nChan.MdiParent = m_parent
End Sub
End Class

same class1.vb. using with event:
Private Sub _Connection_onNickJoin(ByVal szNick As String, ByVal szHost
As String, ByVal szChannel As String) Handles _Connection.onNickJoin
If szNick <> _Connection.Nick Then
deleg = New OneArgSub(AddressOf DisplayMessage)
deleg.Invoke(nChan.rtbChannel, "<" & szNick & "> " & "["
& szHost & "] " & " has joined " & szChannel, GetUserColours.colourJoin, 1)
nChan.Tag = szTag
nChan.Text = szChannel.ToLower & " [" &
nChan.lstNames.Items.Count - 1 & "]"
Debug.WriteLine("joined :" & nChan.Tag)
End If
End Sub

and in frmStatus:
'Creates a new joined Channel
Function CreateChannel() As ClientFactory.CreateNewChannel
Return mainWin.NewChannel()
End Function 'CreateChannel

Private Sub txtStatus_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtStatus.KeyPress
Dim mparent As mainPirateChat
If Asc(e.KeyChar) = 13 Then
'Dim intI As String = CType(CLi.IndexOf(Nick), Integer)
Dim s As String = txtStatus.Text.Substring(0, 4)
If s = "join" Then
szTag = txtStatus.Text.Substring(5)
End If

Debug.WriteLine("sztag :" & szTag)
Netsock.SendData(Netsock.StringToBytes(txtStatus.T ext &
txtStatus.Text = String.Empty
End If
End Sub
does ne 1 have better ideas which channel on which mdichild?
Nov 21 '05 #1
0 1202

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Supra | last post by:
i got mdichild working. i'm working on similar to mirc chat. when i joined channel #vb the first mdichild is on. then when i wanted to join another channel #visualbasic. then i got second mdichild...
by: puunda | last post by:
Hi All, I had previously asked this question with regard to Cyrstal Reports, which I believe is not the most suitable for doing the job. The problem: I need to create a report with X number...
by: Bill English | last post by:
Does C# Support Alpha Channel Backgrounds? I have an image made in Photoshop, which has an alpha channel. I save it as a PNG file, then set the form's BG image to that file. Now it shows up fine...
by: Greg | last post by:
I have one control that absolutely must load before any other controls, due to some initialisation code within it. Is there a way of getting this control to load first? Moving the code from the...
by: Pradeep Arkasali | last post by:
directory is /v_dialer in that i have to find the string v_dialer in all the files as well as subdirectories, here for some of the files i don't have ownership,how can i use ownership in this...
by: Simon | last post by:
I have a solution in Visual Studio 2003 (framework 1.1) which has a Deployment Project which builds an msi file for software distribution. This works fine except for users who do not have full...
by: oneraven | last post by:
I want to have people search for people by professional function, and limit that search to the areas in which the professional is willing to travel to/work in. The areas are broken down into...
by: mikcutu | last post by:
Hello, I am fresh in Oracle and I encounter a problem when I want to update a field from a table which is joined with itself. Functional description: Into a table, it is possible to have a...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.