-
How to send msgbox over the network
Im trying to send msgboxes over the network.
But i can't figur it out.
I would like my program to send messages to one och more computers.
In the same way the DOS command "net send" does.
Ex
net send client It's a nice weather today.
Can i use the net send command in VB or is there another solution to this
problem.
Greetings
Per
-
Re: How to send msgbox over the network
Per,
Try the VB Shell function:
Shell "net send " & toWhom & " " & strMessage
Can't guarantee it, but it is worth a try.
Arthur Wood
"Per Svensson" <zeb1999@hotmail.com> wrote:
>
>Im trying to send msgboxes over the network.
>But i can't figur it out.
>
>I would like my program to send messages to one och more computers.
>In the same way the DOS command "net send" does.
>Ex
>net send client It's a nice weather today.
>
>Can i use the net send command in VB or is there another solution to this
>problem.
>
>Greetings
>Per
-
Re: How to send msgbox over the network
Here is a small routine I use to wrap the net send comand.
Public Sub SendPopUpMsg(ByVal sComputerName As String, ByVal sMsg As String)
'use net send to send a popup message to another computer
'in testing determine that max chars is approximately 2000
On Error Resume Next
Dim lResult As Long
Const iMAXLEN As Integer = 2000
Dim vbDblQuotes As String
vbDblQuotes = Chr$(34)
If Len(sComputerName) > 0 Then
'in testing get error if len >2000
If Len(sMsg) > iMAXLEN Then sMsg = Left$(sMsg, iMAXLEN)
lResult = Shell("net send " & sComputerName & " " & vbDblQuotes & sMsg
& vbDblQuotes, vbMinimizedNoFocus)
DoEvents
End If
End Sub
Kevin
"Arthur Wood" <wooda@saic-trsc.com> wrote:
>
>Per,
>
> Try the VB Shell function:
>
> Shell "net send " & toWhom & " " & strMessage
>
>Can't guarantee it, but it is worth a try.
>
>Arthur Wood
>
>
>"Per Svensson" <zeb1999@hotmail.com> wrote:
>>
>>Im trying to send msgboxes over the network.
>>But i can't figur it out.
>>
>>I would like my program to send messages to one och more computers.
>>In the same way the DOS command "net send" does.
>>Ex
>>net send client It's a nice weather today.
>>
>>Can i use the net send command in VB or is there another solution to this
>>problem.
>>
>>Greetings
>>Per
>
-
Re: How to send msgbox over the network
Ciao Per Svensson,
You can utilized the API function "NetMessageBufferSend"
Ciao Giuseppe.
"Per Svensson" <zeb1999@hotmail.com> wrote:
>
>Im trying to send msgboxes over the network.
>But i can't figur it out.
>
>I would like my program to send messages to one och more computers.
>In the same way the DOS command "net send" does.
>Ex
>net send client It's a nice weather today.
>
>Can i use the net send command in VB or is there another solution to this
>problem.
>
>Greetings
>Per
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|