📄 frmadd.frm
字号:
VERSION 5.00
Begin VB.Form frmAdd
Caption = "加入新的下载任务"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 6465
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 6465
StartUpPosition = 1 'CenterOwner
Begin VB.Frame Frame2
Caption = "加入下载的URL"
BeginProperty Font
Name = "幼圆"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1392
Left = 60
TabIndex = 6
Top = 90
Width = 6312
Begin VB.CommandButton cmdAdd
Caption = "取消"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Index = 1
Left = 4920
TabIndex = 9
Top = 900
Width = 792
End
Begin VB.TextBox txtUrl
Appearance = 0 'Flat
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 288
Left = 960
TabIndex = 8
Text = "http://localhost:81/html/index.htm"
Top = 360
Width = 4932
End
Begin VB.CommandButton cmdAdd
Caption = "加入"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Index = 0
Left = 3900
TabIndex = 7
Top = 900
Width = 792
End
Begin VB.Label Label5
Caption = "URL:"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 192
Left = 300
TabIndex = 10
Top = 420
Width = 552
End
End
Begin VB.Frame Frame1
Caption = "选项"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1635
Left = 60
TabIndex = 0
Top = 1500
Width = 6312
Begin VB.TextBox txtID
Appearance = 0 'Flat
Enabled = 0 'False
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 288
Left = 1740
TabIndex = 5
Text = "zj"
Top = 780
Width = 1332
End
Begin VB.TextBox txtPass
Appearance = 0 'Flat
Enabled = 0 'False
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 288
Left = 1740
TabIndex = 3
Text = "1"
Top = 1140
Width = 1332
End
Begin VB.CheckBox chkAuth
Caption = "身份验证"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 180
TabIndex = 1
Top = 300
Width = 2172
End
Begin VB.Label Label4
Caption = "密码:"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 180
TabIndex = 4
Top = 1260
Width = 1635
End
Begin VB.Label Label3
Caption = "帐号:"
BeginProperty Font
Name = "幼圆"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 180
TabIndex = 2
Top = 780
Width = 1635
End
End
End
Attribute VB_Name = "frmAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub chkAuth_Click()
If chkAuth.Value = 1 Then
txtID.Enabled = True
txtPass.Enabled = True
Else
txtID.Enabled = False
txtPass.Enabled = False
End If
End Sub
Private Sub cmdAdd_Click(Index As Integer)
If Index = 0 Then
Dim i As Integer
For i = 1 To frmDown.LView.ListItems.Count
If frmDown.LView.ListItems(i).Text = txtUrl.Text Then
MsgBox "该URL已经在下载队列中了!"
txtUrl.Text = ""
Exit Sub
End If
Next i
frmDown.AddUrl txtUrl
Dim kk As Integer
kk = UBound(mDownInfo)
ReDim Preserve mDownInfo(kk + 1)
mDownInfo(kk).mUrl = txtUrl.Text
If chkAuth.Value = 1 Then
mDownInfo(kk).mAuthId = txtID.Text
mDownInfo(kk).mAuthPass = txtPass.Text
End If
End If
Unload Me
End Sub
Private Sub Form_Activate()
Dim mStr1 As String
mStr1 = Clipboard.GetText
If InStr(1, mStr1, "http://") = 1 And Len(mStr1) < 180 Then
txtUrl.Text = mStr1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -