Results 1 to 4 of 4

Thread: Is this possible with Winsock?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    124

    Is this possible with Winsock?

    Im an avid VB6 programmer but new to WinSock as of a few days ago. In a client/server setup, is it possible to MsgBox one from the other? Part of my capstone project for college is to create a network auditing program in vb. It will have alot of features that Ive researched already but not sure if it can use MsgBox like that.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Is this possible with Winsock?

    You can't directly MessageBox. I assume you meant calling a messagebox function in the Server and having it execute on the client.

    You can however, send a certain command from the Server to the client, and parse it clientside, to make a messageBox. For example:
    VB Code:
    1. 'Server App
    2. Winsock.SendData "<msgbox>Hello Client!"
    VB Code:
    1. 'Client App
    2. Sub DataArrival()
    3. 'get the data into a strData variable
    4. If (Left$(strData, 8) = "<msgbox>") Then
    5.     MsgBox Mid$(strData, 9, Len(strData) - 9), vbInformation, "MsgBox"
    6. End If
    7. End Sub
    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    124

    Re: Is this possible with Winsock?

    Well, it doesnt necessarily need to be a MsgBox. As long as it is some time of box that pops up on the client side from the server, saying whatever the admin dictates. So lets say I see someone browsing porn and not doing their job, Id like to send a message from the server to them saying "DO your job!" or something of that nature.

  4. #4
    Hyperactive Member ..:RUDI:..'s Avatar
    Join Date
    Aug 2005
    Location
    Yorkshire, England! c0d: Da Vinci
    Posts
    344

    Re: Is this possible with Winsock?

    Now i'm a kind-of newbie to Visual Basic but i'm sure that you'll be able to call a form in the client app. from the server, as in, send a message down the network, then use an 'if..then' statement on the client saying if the server sent a 'calling' message, then if true, it will open up a seperate message window, then type your message!



    My Personal Home | MageBB Home | Elders Online
    Yes, Noteme is my father.

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