Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Send messages across the network and also shows th...
Author:
Prashant Mehta
E-mail:
Click to e-mail author
Submitted:
3/16/2001
Version:
VB6
Compatibility:
VB6
Category:
Networking
Views:
22377
Send messages across the network and also shows the good use of Timers.
Declarations:
'make two command buttons 'make two text boxes 'make two timers 'All with their default name Dim ExecuteVal As Variant Dim Dest As String Dim Strval As String
Code:
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
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement