473,396 Members | 1,918 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,396 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

class1.vb:
Namespace PirateChat
Public Class ClientFactory
\\
\\

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

Shared Sub NewChannel(ByVal szChannel As String)
nChan = New frmChannel
nChan.MdiParent = m_parent
nChan.Show()
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.lstNames.Items.Add(szNick)
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
CreateChannel()
szTag = txtStatus.Text.Substring(5)
End If

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

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

Similar topics

0
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...
2
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...
3
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...
3
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...
2
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...
0
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...
2
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...
10
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.