Re: VB instant messanging
Moved From The CodeBank
I have edited your post and removed your email address.
You should never post your email address in an open post on an open forum. Mail spam bots can pick that up and before you know it, your mailbox is full of junk mail. If you wish to share your email address with other forum members, please do so via our PM system.
In addition, we prefer all answers to questions be publically posted rather than sent via EMail or PM. That way, everyone with a similar problem can benefit.
Thanks. :)
Re: VB instant messanging
To create a new instance of a form...
Code:
Option Explicit
Private Sub Command1_Click()
Dim oForm As Form1
Set oForm = New Form1
oForm.Show
End Sub
Re: VB instant messanging
Thanks for the reply. But it not just creating another form, here is the code in sending message...
>>Class Module
Public Sub SendJabberMessage(ByVal msgTo As String, _
ByVal MsgSubject As String, _
ByVal MsgBody As String)
On Error GoTo SendJabberMessageErr
Set JMsg = v2jSession.CreateMsg 'this will create msg
JMsg.ToJID = msgTo 'this will the recipient
JMsg.Subject = MsgSubject
JMsg.Body = MsgBody 'this is for the msg
JMsg.MsgType = jmtChat
v2jSession.SendMessage JMsg
RaiseEvent OnMessageSent(msgTo, MsgBody)
Exit Sub
SendJabberMessageErr:
RaiseEvent SendError(Err.Description)
If Err.Number > 0 Then
RaiseEvent OnError("# " & Err.Number & " " & Err.Description & "{Source: " & Err.Source & "}")
Exit Sub
End If
End Sub
The scenario is every time a client send message the message will appear on the a different form or window... Like in yahoo messenger when someone send you message a new window appear.. and if another one send a message another window or form will appear..
Thanks a lot... Please help me...
Re: VB instant messanging
Not sure how your data arrives, but a better method maybe to use an array of multiline textboxes or RichTextboxes and with each message make new one visible and the old one invisible or use a one Richtextbox and erase the data
when new data arrive. Or append the data to the last message