Results 1 to 3 of 3

Thread: Send Message when user leaves.(Form_Unload)

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Send Message when user leaves.(Form_Unload)

    Ok... I have a Chat Program, and when the User closes their program, I want to send a message saying that the user has left the chat. To do this, I was going to send out a message as if the user had sent it, but it doesn't seem to be sending it. I have this in the form_Unload, if you can make sense of it.

    VB Code:
    1. Dim tempCommand As command
    2.     tempCommand.type = "MSG"
    3.     tempCommand.fromIP = getCurrentIP
    4.    
    5.    
    6.    
    7.     tempCommand.value = "The User, " + userName + " has left the Conversation."
    8.     sendMessageToSelectedUsers tempCommand

    Any ideas?


    Thanks in advance.
    Don't Rate my posts.

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Normally its the software on the other clients' machines that tells the user that another user has left.
    Thats the way IRC works
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Nevermind, DoEvents did the trick

    Yeah... it will update in a Listbox, but this is easier and allows users to notice when they leave....
    Don't Rate my posts.

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