Results 1 to 5 of 5

Thread: VB instant messanging

  1. #1

    Thread Starter
    New Member a_mon0410's Avatar
    Join Date
    Jul 2008
    Posts
    11

    VB instant messanging

    Hi there,

    I do have a problem in my instant messaging, how can i make my instant messaging client to create a new instance, meaning new form or window whenever they send message... And if the window is closed, the message will still be on that window or form, showing the previous messages. I've VB6 for the coding and jabberCom.dll... Please help me... This problem will be the basis of my stay in my company, Please help me...

    >> Removed By Mod

    Thanks very much
    Last edited by Hack; Jan 9th, 2009 at 09:50 AM. Reason: Removed EMail Address

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    New Member a_mon0410's Avatar
    Join Date
    Jul 2008
    Posts
    11

    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...

  5. #5
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    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
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width