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

📄 frmdown.frm

📁 断点续传多任务下载系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmDown 
   BackColor       =   &H00C0C0C0&
   Caption         =   "断点续传程序"
   ClientHeight    =   7080
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   8760
   LinkTopic       =   "Form1"
   ScaleHeight     =   7080
   ScaleWidth      =   8760
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      Caption         =   "系统功能"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   3552
      Left            =   6420
      TabIndex        =   9
      Top             =   3300
      Width           =   2232
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H00800000&
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C0FFFF&
         Height          =   2652
         Left            =   60
         MultiLine       =   -1  'True
         TabIndex        =   11
         Text            =   "frmDown.frx":0000
         Top             =   780
         Width           =   2112
      End
      Begin VB.Label Label1 
         Caption         =   "=2K Bytes"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   252
         Left            =   540
         TabIndex        =   10
         Top             =   420
         Width           =   1332
      End
      Begin VB.Shape Shape1 
         FillColor       =   &H00FF0000&
         FillStyle       =   0  'Solid
         Height          =   192
         Left            =   180
         Shape           =   2  'Oval
         Top             =   420
         Width           =   192
      End
   End
   Begin MSComDlg.CommonDialog CDlg 
      Left            =   0
      Top             =   2940
      _ExtentX        =   688
      _ExtentY        =   688
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "下载任务列表"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   3132
      Left            =   0
      TabIndex        =   3
      Top             =   60
      Width           =   8652
      Begin MSComctlLib.ListView LView 
         DragIcon        =   "frmDown.frx":008E
         Height          =   2472
         Left            =   60
         TabIndex        =   4
         Top             =   240
         Width           =   8532
         _ExtentX        =   15055
         _ExtentY        =   4366
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         OLEDropMode     =   1
         FlatScrollBar   =   -1  'True
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         Icons           =   "ImageList1"
         SmallIcons      =   "ImageList1"
         ColHdrIcons     =   "ImageList1"
         ForeColor       =   33023
         BackColor       =   16777215
         BorderStyle     =   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         OLEDropMode     =   1
         NumItems        =   0
      End
      Begin VB.Label lblTishi 
         BackColor       =   &H00C0C0FF&
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000C0&
         Height          =   252
         Left            =   120
         TabIndex        =   5
         Top             =   2760
         Width           =   8292
      End
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   0
      Top             =   1680
   End
   Begin MSWinsockLib.Winsock Wsock 
      Index           =   0
      Left            =   0
      Top             =   3240
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   3792
      Left            =   60
      TabIndex        =   0
      Top             =   3240
      Width           =   6312
      _ExtentX        =   11139
      _ExtentY        =   6694
      _Version        =   393216
      TabHeight       =   420
      BackColor       =   8388608
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "幼圆"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TabCaption(0)   =   "信息提示"
      TabPicture(0)   =   "frmDown.frx":04D0
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "txtInfo"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "下载情况"
      TabPicture(1)   =   "frmDown.frx":04EC
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "Pic(0)"
      Tab(1).Control(1)=   "Pic(1)"
      Tab(1).Control(2)=   "Pic(2)"
      Tab(1).ControlCount=   3
      TabCaption(2)   =   "文件信息"
      TabPicture(2)   =   "frmDown.frx":0508
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "txtFile"
      Tab(2).ControlCount=   1
      Begin VB.PictureBox Pic 
         AutoRedraw      =   -1  'True
         AutoSize        =   -1  'True
         BackColor       =   &H0080C0FF&
         FillColor       =   &H00FF0000&
         FillStyle       =   0  'Solid
         Height          =   3372
         Index           =   2
         Left            =   -74940
         ScaleHeight     =   3315
         ScaleWidth      =   6135
         TabIndex        =   8
         Top             =   360
         Visible         =   0   'False
         Width           =   6192
      End
      Begin VB.PictureBox Pic 
         AutoRedraw      =   -1  'True
         AutoSize        =   -1  'True
         BackColor       =   &H0080C0FF&
         FillColor       =   &H00FF0000&
         FillStyle       =   0  'Solid
         Height          =   3372
         Index           =   1
         Left            =   -74940
         ScaleHeight     =   3315
         ScaleWidth      =   6135
         TabIndex        =   7
         Top             =   360
         Visible         =   0   'False
         Width           =   6192
      End
      Begin VB.TextBox txtFile 
         BackColor       =   &H00800000&
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   7.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   3432
         Left            =   -74940
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   6
         Top             =   300
         Width           =   6192
      End
      Begin VB.PictureBox Pic 
         AutoRedraw      =   -1  'True
         AutoSize        =   -1  'True
         BackColor       =   &H0080C0FF&
         FillColor       =   &H00FF0000&
         FillStyle       =   0  'Solid
         Height          =   3372
         Index           =   0
         Left            =   -74940
         ScaleHeight     =   3315
         ScaleWidth      =   6135
         TabIndex        =   2
         Top             =   360
         Visible         =   0   'False
         Width           =   6192
      End
      Begin VB.TextBox txtInfo 
         BackColor       =   &H00800000&
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   3432
         Left            =   60
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   300
         Width           =   6192
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   -120
      Top             =   2520
      _ExtentX        =   794
      _ExtentY        =   794
      BackColor       =   -2147483643
      ImageWidth      =   20
      ImageHeight     =   20
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   9
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":0524
            Key             =   "close"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":0978
            Key             =   "ok"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":0DCC
            Key             =   "delete"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":1220
            Key             =   "error"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":1674
            Key             =   "start"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":1AC8
            Key             =   "file"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":1F1C
            Key             =   "root"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":2370
            Key             =   "open"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmDown.frx":27C4
            Key             =   "stop"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menufile 
      Caption         =   "文件"
      Begin VB.Menu menuadd 
         Caption         =   "加入新任务"
      End
      Begin VB.Menu menuquit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu menusetup 
      Caption         =   "设置"
      Begin VB.Menu menuDel 
         Caption         =   "删除"
      End
   End
End
Attribute VB_Name = "frmDown"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Xitem As ListItem
Dim mDownInfoSave As DownInfoSave

'声明正在下载的任务的类变量
Dim DownJet(1 To 2) As clsDown

Private Sub add_Click()
frmAdd.Show vbModal
End Sub

Private Sub Form_Load()

MinForm.Show
CDlg.FileName = App.Path & "\TEMP"
'加载用于下载的Winsock控件,可同时执行两个任务
Load Wsock(1)
Load Wsock(2)
'创建两个类对象,每个对象负责一个下载任务
Set DownJet(1) = New clsDown
Set DownJet(2) = New clsDown
'初始化ListView控件
LView.ColumnHeaders.Clear
LView.ColumnHeaders.Add , , "URL地址", LView.Width - 240 * Screen.TwipsPerPixelX
LView.ColumnHeaders.Add , , "大小", 80 * Screen.TwipsPerPixelX
LView.ColumnHeaders.Add , , "已下载大小", 80 * Screen.TwipsPerPixelX
LView.ColumnHeaders.Add , , "时间", 80 * Screen.TwipsPerPixelX
'从数据文件中读取下载任务的信息,加入到ListView中
Dim i
Dim Fnum As Integer
Dim mFname As String
'保存下载任务信息的文件
mFname = App.Path & "\Downjet.djt"
Fnum = FreeFile
Open mFname For Random As #Fnum Len = Len(mDownInfoSave)
i = 1
While Not EOF(Fnum)

⌨️ 快捷键说明

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