Hej Morten denne her:
http://www.freevbcode.com/ShowCode.Asp?ID=395
Mvh
www.cadmageren.dk
Michael Christoffersen
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 BroadcastMessage(sToUser As String, _
sFromUser As String, sMessage As String) As Boolean
Dim yToName() As Byte
Dim yFromName() As Byte
Dim yMsg() As Byte
Dim l As Long
yToName = sToUser & vbNullChar
yFromName = sFromUser & vbNullChar
yMsg = sMessage & vbNullChar
If NetMessageBufferSend(ByVal 0&, yToName(0), ByVal 0&, _
yMsg(0), UBound(yMsg)) = NERR_Success Then
BroadcastMessage = True
End If
End Function
Private Sub Command1_Click()
Dim x As Boolean
x = BroadcastMessage(TxtTo.Text, TxtFrom.Text, TxtMsg.Text)
If x Then
MsgBox "Message Sent"
Else
MsgBox "Message Not Sent"
End If
End Sub
--
Leveret af:
http://www.kandu.dk/
"Vejen til en hurtig løsning"