Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    23

    Unanswered: winsock send msgbox

    how to show msgbox on your client?

    if the server has an IP add 192.168.14.1
    and client has 192.168.14.2

    when server(192.168.14.1) will close or the form will unload, the conncetion must close but before it close it must inform the client(192.168.14.2). i tried to send msgbox

    Code:
    Winsock1.SendData MsgBox("Disconnected by user!", vbOKOnly)
    but it doesn work, msgbox show on server(192.168.14.1) instead.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    A messagebox is a UI function within VB. It is not an object you could pass.

    Send a text message via winsock, and decode that message at the receiving end... Then, return an acknowlegment message BACK to the server.

    WHERE is the above statement located? I would think that it should be located in the queryunload event. And, you will need to place code in the queryunload event to verify that the ACK from the client has been received before the unload can continue.

    I suggest you take a look at the communications forum at our INet sister site, XTremevbTalk.Com
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Feb 2009
    Posts
    23
    'it is located at Form_Unload...

    'i'll try your suggestion.

Posting Permissions

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