|
-
Jul 31st, 2005, 10:56 PM
#1
Thread Starter
Lively Member
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.
-
Aug 1st, 2005, 02:53 AM
#2
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
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Aug 1st, 2005, 10:00 AM
#3
Thread Starter
Lively Member
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.
-
Aug 1st, 2005, 12:40 PM
#4
Hyperactive Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|