DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Per Svensson Guest

    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

  2. #2
    Arthur Wood Guest

    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



  3. #3
    Kevin MacCallum Guest

    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

    >



  4. #4
    Giuseppe Guest

    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



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links