Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Simple Send using Net Send

0.00/5 (No votes)
24 May 2004 1  
Simple front end for sending text messages over LAN

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 
     'somehow a list item is in fact a string

      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
          'pause to stop out of sequence message chunks

          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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here