Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / Visual Basic
Article

Simple Send using Net Send

Rate me:
Please Sign up or sign in to vote.
3.00/5 (8 votes)
24 May 2004 115.3K   3.1K   34   8
Simple front end for sending text messages over LAN

Image 1

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 :-

VB.NET
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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionChat App Pin
HasanGMC24-Sep-17 3:28
HasanGMC24-Sep-17 3:28 
GeneralMessenger Seervice is obsolete in XP SP2 and Vista Pin
VF14-Oct-07 1:29
VF14-Oct-07 1:29 
GeneralReceive message. Pin
Tailana31-May-05 22:39
Tailana31-May-05 22:39 
GeneralThere's a much better article about this Pin
juanchosc25-May-04 8:47
sussjuanchosc25-May-04 8:47 
GeneralIt works but... Pin
Anonymous25-May-04 2:42
Anonymous25-May-04 2:42 
- It isn't particularly useful. Really, email or conversation or IM or anything is more useful, so it's not much use as a tool.

- It isn't a particularly informative article. Nothing new, nothing particularly educational, no new technique.

So while it works articles are more use if you think about who the target audience is - and explain who in the article
GeneralRe: It works but... Pin
Jason McBurney25-May-04 8:42
Jason McBurney25-May-04 8:42 
GeneralRe: It works but... Pin
Anonymous18-Jan-05 6:19
Anonymous18-Jan-05 6:19 
GeneralRe: It works but... Pin
BodyGlove19-Jan-06 7:16
BodyGlove19-Jan-06 7:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.