
Introduction
This article shows a basic front-end for Net Send that allows sending
messages to multiple recipients.
Using the code
The heart of the whole operation lies below :-
If lstnames.SelectedItems.Count > 0 Then
For Each strSeleted As String In lstnames.SelectedItems
Dim strname As String = " " & strSeleted
Dim lngPos As Long = 1
Do
Dim lretval As Long = Shell("net send " & strname & _
" """ & Mid(strMessage, lngPos, iChunk) & """", vbHide)
lngPos += iChunk
Sleep(100)
Loop Until lngPos > Len(strMessage)
strStatus &= strname.ToString
Next strSeleted
End If
Points of Interest
Very useful for sending error messages to nearby developers.