473,322 Members | 1,232 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,322 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 1402

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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.