如题...................

解决方案 »

  1.   

    Private Sub Command1_Click()
    Shell "cmd.exe /c net send 10.10.1.10 haha>c:\a.txt"Set objfso = CreateObject("Scripting.FileSystemObject")
    Const ForReading = 1
    Set objTextFile = objfso.OpenTextFile ("c:\a.txt", ForReading)
    Do Until objTextFile.AtEndOfStream
        strNextLine = objTextFile.Readline
        MsgBox strNextLine
        '然后判断strNextLine,以里面的关键字来区分是成功还是失败
    LoopobjTextFile.Close
    Set objTextFile = Nothing
    Set objfso = NothingEnd Sub
      

  2.   

    下载地址:http://www.torontoservice.com/lihonggen/message.zip
    VB版主lihonggen0(李洪根)写的一个局域网消息发送器,全力推荐下载,OICQ界面,垂直菜单控件技术,局域网消息发送技术,网络资源访问技术,系统托盘技术,资源管理器界面的分隔条技术,API函数使用等,为初学者提供一个代码例子。
      

  3.   

    Private Declare Function NetMessageBufferSend Lib _
      "NETAPI32.DLL" (yServer As Any, yToName As Byte, _
      yFromName As Any, yMsg As Byte, ByVal lSize As Long) As Long
    Private Const NERR_Success As Long = 0&Public Function SendMessageNet(RcptToUser As String, _
       FromUser As String, BodyMessage As String) As Boolean
     
       Dim RcptTo() As Byte
       Dim From() As Byte
       Dim Body() As Byte   RcptTo = RcptToUser & vbNullChar
       From = FromUser & vbNullChar
       Body = BodyMessage & vbNullChar   If NetMessageBufferSend(ByVal 0&, RcptTo(0), ByVal 0&, _
            Body(0), UBound(Body)) = NERR_Success Then
         SendMessageNet = True
       End If
    End Function
      

  4.   

    RetVal = SendMessageNet(Trim(cboComputer.Text), strComputerName, str)
        If RetVal Then
            MsgBox "发送成功! ", vbInformation, "局域网消息发送器"
        Else
            MsgBox "发送失败!", vbCritical, "局域网消息发送器"
        End If
      

  5.   

    调用NetMessageBufferSend这个API函数,获取返回值