⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 用VB调用SSH控件
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmClient 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Win SSH"
   ClientHeight    =   5910
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8670
   FillColor       =   &H00FFFF80&
   ForeColor       =   &H00FFFF00&
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5910
   ScaleWidth      =   8670
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1500
      Left            =   8880
      Top             =   2160
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   8760
      TabIndex        =   11
      Top             =   960
      Width           =   1455
   End
   Begin VB.TextBox txtOutput3 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FFFF00&
      Height          =   5295
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   10
      Top             =   360
      Visible         =   0   'False
      Width           =   8655
   End
   Begin VB.ListBox List1 
      Height          =   2040
      Left            =   7920
      TabIndex        =   8
      Top             =   6480
      Width           =   1815
   End
   Begin VB.TextBox txtOutput2 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FFFF00&
      Height          =   5295
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   7
      Top             =   360
      Visible         =   0   'False
      Width           =   8655
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   255
      Left            =   5520
      TabIndex        =   6
      Top             =   6000
      Width           =   615
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   6240
      TabIndex        =   5
      Top             =   6000
      Width           =   2655
   End
   Begin VB.TextBox TextDirectory 
      Height          =   285
      Left            =   720
      TabIndex        =   2
      Text            =   "C:"
      ToolTipText     =   "Specify a directory here and click on the Browse button"
      Top             =   6000
      Width           =   4695
   End
   Begin VB.TextBox txtCMD 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FFFF00&
      Height          =   270
      Left            =   0
      TabIndex        =   1
      Top             =   5640
      Width           =   8655
   End
   Begin VB.TextBox txtOutput 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FFFF00&
      Height          =   5295
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   360
      Width           =   8655
   End
   Begin MSWinsockLib.Winsock Client 
      Left            =   3360
      Top             =   2640
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   2295
      Left            =   120
      TabIndex        =   3
      Top             =   6480
      Width           =   3135
      _ExtentX        =   5530
      _ExtentY        =   4048
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      OLEDropMode     =   1
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      Icons           =   "ImageList"
      SmallIcons      =   "ImageList"
      ColHdrIcons     =   "ImageList"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      OLEDropMode     =   1
      NumItems        =   0
   End
   Begin MSComctlLib.ListView ListView2 
      Height          =   2295
      Left            =   3240
      TabIndex        =   4
      Top             =   6480
      Width           =   4575
      _ExtentX        =   8070
      _ExtentY        =   4048
      View            =   3
      LabelEdit       =   1
      MultiSelect     =   -1  'True
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      OLEDropMode     =   1
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483648
      BorderStyle     =   1
      Appearance      =   1
      OLEDropMode     =   1
      NumItems        =   0
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   8160
      Top             =   0
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   13
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0442
            Key             =   "key1"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":2BF4
            Key             =   "key2"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":8E8E
            Key             =   "key3"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":EAB0
            Key             =   "key4"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":14D4A
            Key             =   "key5"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1AFE4
            Key             =   "key6"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B436
            Key             =   "Open"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B548
            Key             =   "Save"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B65A
            Key             =   "Map Network Drive"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B76C
            Key             =   "Disconnect Net Drive"
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B87E
            Key             =   "Bold"
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1B990
            Key             =   "Find"
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":1BAA2
            Key             =   "Help What's This"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   360
      Left            =   0
      TabIndex        =   9
      Top             =   0
      Width           =   8670
      _ExtentX        =   15293
      _ExtentY        =   635
      ButtonWidth     =   609
      ButtonHeight    =   582
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      DisabledImageList=   "ImageList1"
      HotImageList    =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   7
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key1"
            Object.ToolTipText     =   "打开"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key2"
            Object.ToolTipText     =   "保存"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key3"
            Object.ToolTipText     =   "映射网络驱动器"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key4"
            Object.ToolTipText     =   "断开网络驱动器"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key5"
            Object.ToolTipText     =   "粗体"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "key6"
            Object.ToolTipText     =   "查找"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "帮助这是什么"
            Object.ToolTipText     =   "帮助这是什么"
         EndProperty
      EndProperty
      BorderStyle     =   1
      Begin VB.Timer Timer3 
         Enabled         =   0   'False
         Interval        =   1000
         Left            =   7800
         Top             =   0
      End
   End
End
Attribute VB_Name = "frmClient"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SendData As String
Dim ScanRun As Boolean
Dim WaitForInfo As Boolean
Dim StoredData(0 To 10) As String
Dim text As String
Dim der As Boolean

Dim i As Integer
Dim d As Boolean
Dim fso As New FileSystemObject
Dim strDrive As String
Dim strFolder As String

Private Sub Client_Connect()
 'Client.SendData "[LOAD DRIVE DATA]"
    'FrmMain.ListView2.ListItems.Clear
        
 '   WaitTime = 0
 '   Do Until WaitTime = 10000
 '       WaitTime = WaitTime + 1: DoEvents
 '       Loop

 '   Client.SendData "[LOAD FOLDER DATA]" & TextDirectory.Text
    
 '   WaitTime = 0
 '   Do Until WaitTime = 10000
 '       WaitTime = WaitTime + 1: DoEvents
 '       Loop
    
 '   Client.SendData "[LOAD FOLDER NAME]" & TextDirectory.Text
 '   WaitTime = 0
 '   Do Until WaitTime = 10000
 '       WaitTime = WaitTime + 1: DoEvents
 '       Loop
    
    txtOutput.text = "Connect Remote" & Client.RemoteHostIP
    txtOutput2.text = "Connect Remote" & Client.RemoteHostIP
    
  ' Client.SendData "[FILE SIZE DATA]" & TextDirectory.Text
End Sub

Private Sub Client_DataArrival(ByVal bytesTotal As Long)
On Error GoTo FinaliseError
    Dim MyText As String
    Dim Data As String
    Dim Myinput As String
    Dim GetLine As Long
    Dim LastLine As Long
    Dim ChrState As String
    Dim ProcessFileCount As Integer
    Dim DriveListCount As Long
    ''''''''''''''''''''''''''''''
    Dim Pirinure As Long
    ''''''''''''''''''''''''''''
    ' WinSockCtl.GetData MyText
    
    'WinSockCtl.GetData Pirinure = FrmPicture.Picture1.Picture
    
    Client.GetData Data
   
    
    '删除失败
    If Left(Data, 6) = "sorry1" Then
    txtOutput2.Visible = True
    txtOutput2.text = vbCrLf & "[Sorry You Not Del File]" & vbCrLf
    
    End If
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -