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

📄 download_properties.pag

📁 HTTP文件下载控件源代码 提供了使用HTTP下载文件时的控制方法及处理方法
💻 PAG
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.PropertyPage DownLoad_Properties 
   Caption         =   "DownLoad_Properties"
   ClientHeight    =   3495
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5925
   PaletteMode     =   0  'Halftone
   ScaleHeight     =   3495
   ScaleWidth      =   5925
   Begin VB.CommandButton CSD 
      Caption         =   "..."
      Height          =   255
      Left            =   5640
      TabIndex        =   10
      Top             =   1800
      Width           =   255
   End
   Begin MSComDlg.CommonDialog cd1 
      Left            =   0
      Top             =   3480
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CheckBox ChkPC 
      Caption         =   "Check to prompt user if (s)he would like to overwrite file(s)."
      Height          =   375
      Left            =   3120
      TabIndex        =   9
      Top             =   2160
      Width           =   2415
   End
   Begin VB.CheckBox ChkOC 
      Caption         =   "Check to test Internet Connection before downloading."
      Height          =   615
      Left            =   120
      TabIndex        =   8
      Top             =   2160
      Width           =   2055
   End
   Begin VB.CheckBox Chkpreserve 
      Caption         =   "Check to preserve file extension."
      Height          =   375
      Left            =   3120
      TabIndex        =   7
      Top             =   1080
      Width           =   2535
   End
   Begin VB.ComboBox ChunkCombo 
      Height          =   315
      Left            =   120
      TabIndex        =   5
      Text            =   "Select Chunk Size*"
      Top             =   1080
      Width           =   2655
   End
   Begin VB.TextBox txtSaveLocation 
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   1680
      Width           =   5535
   End
   Begin VB.TextBox txtUrl 
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   360
      Width           =   5535
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "* Note - The best chunk size to use on a 56K is 1024."
      Height          =   195
      Left            =   0
      TabIndex        =   6
      Top             =   3120
      Width           =   3795
   End
   Begin VB.Label lblSaveLocation 
      Caption         =   "Save Location:"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   1440
      Width           =   2775
   End
   Begin VB.Label lblCHUNK 
      Caption         =   "CHUNK SIZE:"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   2
      Top             =   840
      Width           =   2775
   End
   Begin VB.Label lblUrl 
      Caption         =   "Url Of File:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2775
   End
End
Attribute VB_Name = "DownLoad_Properties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Dim IsChecked(1 To 3) As Boolean
Private Sub chkPromptOverwrite_Click()
    Changed = True
End Sub



Private Sub ChkOC_Click()
If ChkOC.Value = 1 Then
IsChecked(2) = True
Else
IsChecked(2) = False
End If
Changed = True
End Sub

Private Sub ChkPC_Click()
If ChkPC.Value = 1 Then
IsChecked(3) = True
Else
IsChecked(3) = False
End If
Changed = True
End Sub

Private Sub Chkpreserve_Click()
If Chkpreserve.Value = 1 Then
IsChecked(1) = True
Else
IsChecked(1) = False
End If
Changed = True
End Sub

Private Sub ChunkCombo_Change()
Changed = True
End Sub

Private Sub CSD_Click()
With cd1
.DialogTitle = "Please choose a place to save."
.Filter = "(*.*) All Files|*.*"
.ShowSave
If .FileName > "" Then
txtSaveLocation = .FileName
End If
End With
End Sub

Private Sub PropertyPage_Initialize()
With ChunkCombo
.AddItem "256"
.AddItem "512"
.AddItem "1024"
.AddItem "2048"
End With
End Sub

Private Sub txtSaveLocation_Change()
    Changed = True
End Sub


Private Sub txtCHUNK_Change()
    Changed = True
End Sub


Private Sub txtUrl_Change()
    Changed = True
End Sub


Private Sub PropertyPage_ApplyChanges()
    SelectedControls(0).SaveLocation = txtSaveLocation.Text
    SelectedControls(0).CHUNK = ChunkCombo.Text
    SelectedControls(0).Url = txtUrl.Text
    SelectedControls(0).KeepType = IsChecked(1)
    SelectedControls(0).OnlineCheck = IsChecked(2)
    SelectedControls(0).PromptOverwrite = IsChecked(3)
End Sub


Private Sub PropertyPage_SelectionChanged()
    txtSaveLocation.Text = SelectedControls(0).SaveLocation
    ChunkCombo.Text = SelectedControls(0).CHUNK
    txtUrl.Text = SelectedControls(0).Url
   If SelectedControls(0).KeepType = True Then
   Chkpreserve.Value = 1
   Else
   Chkpreserve.Value = 0
   End If
   If SelectedControls(0).OnlineCheck = True Then
   ChkOC.Value = 1
   Else
   ChkOC.Value = 0
   End If
   If SelectedControls(0).PromptOverwrite = True Then
   ChkPC.Value = 1
   Else
   ChkPC.Value = 0
   End If

End Sub


⌨️ 快捷键说明

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