home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{95C9A3B6-DDF5-11D1-B910-00A0C992A443}#1.0#0"; "RSH.ocx"
- Begin VB.Form Form1
- Caption = "Remote Shell Demo Form"
- ClientHeight = 4365
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6360
- LinkTopic = "Form1"
- LockControls = -1 'True
- ScaleHeight = 4365
- ScaleWidth = 6360
- StartUpPosition = 3 'Windows Default
- Begin RSH.RemoteShell RemoteShell1
- Left = 135
- Top = 3735
- _ExtentX = 847
- _ExtentY = 847
- Async = "False"
- End
- Begin VB.TextBox Text5
- Height = 330
- IMEMode = 3 'DISABLE
- Left = 1170
- PasswordChar = "*"
- TabIndex = 8
- Text = "password"
- Top = 1170
- Width = 5010
- End
- Begin VB.TextBox Text4
- Height = 330
- Left = 1170
- TabIndex = 6
- Text = "user"
- Top = 810
- Width = 5010
- End
- Begin VB.TextBox Text3
- Height = 330
- Left = 1170
- TabIndex = 4
- Text = "192.168.0.1"
- Top = 450
- Width = 5010
- End
- Begin VB.TextBox Text2
- Height = 330
- Left = 1170
- TabIndex = 2
- Text = "ls -l"
- Top = 90
- Width = 5010
- End
- Begin VB.TextBox Text1
- Height = 1995
- Left = 1170
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Top = 1575
- Width = 5010
- End
- Begin VB.CommandButton Command1
- Caption = "Execute"
- Height = 555
- Left = 4185
- TabIndex = 0
- Top = 3690
- Width = 1995
- End
- Begin VB.Label Label5
- Caption = "Response:"
- Height = 285
- Left = 90
- TabIndex = 10
- Top = 1665
- Width = 1140
- End
- Begin VB.Label Label4
- Caption = "Password:"
- Height = 285
- Left = 90
- TabIndex = 9
- Top = 1215
- Width = 1140
- End
- Begin VB.Label Label3
- Caption = "Username:"
- Height = 285
- Left = 90
- TabIndex = 7
- Top = 855
- Width = 1140
- End
- Begin VB.Label Label2
- Caption = "Host:"
- Height = 285
- Left = 90
- TabIndex = 5
- Top = 495
- Width = 1140
- End
- Begin VB.Label Label1
- Caption = "Command:"
- Height = 285
- Left = 90
- TabIndex = 3
- Top = 135
- Width = 1140
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '********************************************************************************
- '* Module: Form1
- '* Author: Greg Laycock
- '* Description:
- '********************************************************************************
- '* Revision:
- '********************************************************************************
- Option Explicit
- '********************************************************************************
- '* Procedure: Command1_Click
- '* Author: Greg Laycock
- '* Description:
- '* Execute Command
- '********************************************************************************
- Private Sub Command1_Click()
- RemoteShell1.Host = Text3.Text
- RemoteShell1.UserName = Text4.Text
- RemoteShell1.Password = Text5.Text
- RemoteShell1.Command = Text2.Text
- Call RemoteShell1.Process
- End Sub
- '********************************************************************************
- '* Procedure: RemoteShell1_AsyncComplete
- '* Author: Greg Laycock
- '* Description:
- '* Async Complete Message
- '********************************************************************************
- Private Sub RemoteShell1_AsyncComplete()
- MsgBox "Complete!"
- End Sub
- '********************************************************************************
- '* Procedure: RemoteShell1_Error
- '* Author: Greg Laycock
- '* Description:
- '* Connection Error Event
- '********************************************************************************
- Private Sub RemoteShell1_Error(ByVal ErrorNumber As String, ByVal ErrorText As String)
- Text1.Text = ErrorNumber & "-" & ErrorText
- End Sub
- '********************************************************************************
- '* Procedure: RemoteShell1_ReceiveData
- '* Author: Greg Laycock
- '* Description:
- '* Receive Data Event
- '********************************************************************************
- Private Sub RemoteShell1_ReceiveData(ByVal InData As String)
- Text1.Text = Text1.Text & InData
- End Sub
-