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. :confused:
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:
'Server App
Winsock.SendData "<msgbox>Hello Client!"
VB Code:
'Client App
Sub DataArrival()
'get the data into a strData variable
If (Left$(strData, 8) = "<msgbox>") Then
MsgBox Mid$(strData, 9, Len(strData) - 9), vbInformation, "MsgBox"
End If
End Sub
chem
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.
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!