📄 basmisc.bas
字号:
Attribute VB_Name = "basMisc"
Public Function NetSend(sName As String, sMessage As String) As Boolean
'This function will read machine names and send Message to teh corresponding Machine
Dim iPos As Integer
Dim iCount As Integer
Dim i As Integer
Dim iLen As Integer
Dim sMachine() As String
'
NetSend = False
If Trim(sName) = "" Then
Exit Function
End If
iLen = Len(Trim(sName))
iCount = 0
'Get number of sustem names
For i = 1 To iLen
If InStr(i, sName, ",") <> 0 Then
iCount = iCount + 1
i = InStr(i, sName, ",")
End If
Next i
If iCount = 0 Then
Shell ("net send " & sName & " " & sMessage)
Exit Function
Else
ReDim sMachine(iCount)
End If
sMachine = Split(sName, ",")
For i = 0 To iCount
Shell ("net send " & sMachine(i) & " " & sMessage)
Next i
NetSend = True
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -