Отправка сообщений по сети
'Создайте две кнопки
'Создайте два текстовых поля
'Создайте два таймера
'Оставьте все имена элементов управления
поумолчанию
Dim ExecuteVal As Variant
Dim Dest As String
Dim Strval As String
Private Sub Command1_Click()
Dim t, m
t = Trim(Text2.Text)
m = Trim(Text1.Text)
If t = "" Then
MsgBox "Enter Remote Computer Name" & Chr(13) & "For this
message"
Text2.SetFocus
ElseIf m = "" Then
MsgBox "Enter Some Message"
Text1.SetFocus
End If
Strval = "net send " & t & " " & m
ExecuteVal = Shell(Strval)
End Sub
Private Sub Command2_Click()
Me.bandh
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = True
Me.bandh
End Sub
Private Sub Timer1_Timer()
Label4.Caption = "Bye Prashant !!"
End Sub
Private Sub Timer2_Timer()
End
End Sub
Public Sub bandh()
Timer1.Enabled = True
Timer2.Enabled = True
Timer1.Interval = 200
Timer2.Interval = 1400
End Sub
|