473,386 Members | 1,766 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,386 software developers and data experts.

mdichild

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?

Jul 21 '05 #1
0 1407

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

Similar topics

1
by: Mickey Swanson | last post by:
I have a MDI app wich has several different forms I need to call a method on one MDIchild form from another child form. I have a MDI form called frmMDI. I have a mdichild form called frmMain....
6
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the...
2
by: SpotNet | last post by:
Hello NewsGroup, I have a MDIParent form with a docked left treeview control, a splitter control and a generic docked control on the right. Kind of looks like Windows Explorer, though it's...
7
by: VM | last post by:
Hi, Is it possible to open always only one instance of a MDIChild form? Say, if form A is already opened, just give it the focus. I tried declaring theMDIChild forms as private members of the...
1
by: LCAdeveloper | last post by:
Can anyone help me with this? I'm trying to get an MDIChild form to lookup the value of a control on another open MDIChild form, but can't seem to get the right syntax. Let's say the two child...
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...
0
by: Supra | last post by:
i got code working. similar to mirc chat. but what happen when i joined the channel #visualbasic...that fine with me , i got all data coming into first mdichild. but when i joined another channel...
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...
0
by: kardiss | last post by:
I am trying to add Meebo's "Pop-out" kinda feature to my application which when a button is pressed in a MdiChild form, it kicks that MdiChild form out of the MdiParent boundary and acts like a SDI...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.