Click here to Skip to main content
13,195,026 members (100,663 online)
Click here to Skip to main content
Add your own
alternative version

Stats

103.7K views
2.7K downloads
34 bookmarked
Posted 24 May 2004

Simple Send using Net Send

, 24 May 2004
Rate this:
Please Sign up or sign in to vote.
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

Share

About the Author

gordonchristie
United States United States
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionChat App Pin
HasanGMC24-Sep-17 3:28
memberHasanGMC24-Sep-17 3:28 
GeneralMessenger Seervice is obsolete in XP SP2 and Vista Pin
VF14-Oct-07 1:29
memberVF14-Oct-07 1:29 
GeneralReceive message. Pin
Tailana31-May-05 22:39
memberTailana31-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
sussAnonymous25-May-04 2:42 
GeneralRe: It works but... Pin
Jason McBurney25-May-04 8:42
memberJason McBurney25-May-04 8:42 
Anonymous wrote:
It isn't particularly useful.

I disagree, I use net send in my batch/build files all the time. The message is sent and left on the screen until the user clicks it away, they know they have a new build of the system. I don't have to call or talk to voicemail for all of my users.

Also, I don't use IM in the office, due to company policy, but I do want to send a quick message to a person on the phone.

I think the topic has it place. Why be critical of the topic? Let's be a litte more positive, eh? All information is good information. If it is bad information, we can learn how not to do it poorly next time.

to the Author:
The article could be a little more in depth and informitive, I do agree with that. Maybe discuss net send, or the shell command, or do a version 2 with APIs ... describe the challenges, or how you use net send.

Nor do I recommend using sleep to solve your our of order race condition.
do you need to investigate an online backup company
GeneralRe: It works but... Pin
Anonymous18-Jan-05 6:19
sussAnonymous18-Jan-05 6:19 
GeneralRe: It works but... Pin
BodyGlove19-Jan-06 7:16
memberBodyGlove19-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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171018.2 | Last Updated 25 May 2004
Article Copyright 2004 by gordonchristie
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid