-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrmAddDwn.frm
162 lines (158 loc) · 4.77 KB
/
frmAddDwn.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
VERSION 5.00
Begin VB.Form frmAddDwn
BorderStyle = 3 'Fixed Dialog
Caption = "Add New Download"
ClientHeight = 2895
ClientLeft = 45
ClientTop = 345
ClientWidth = 6255
Icon = "frmAddDwn.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2895
ScaleWidth = 6255
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Tag = "5"
Begin VB.CommandButton cmdOK
BackColor = &H00E0E0E0&
Caption = "&OK"
Default = -1 'True
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2880
TabIndex = 3
Tag = "8"
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdCnl
BackColor = &H00E0E0E0&
Cancel = -1 'True
Caption = "&Cancel"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4320
TabIndex = 2
Tag = "9"
Top = 1920
Width = 1575
End
Begin VB.TextBox txtURL
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 1
Top = 480
Width = 4575
End
Begin VB.TextBox txtFile
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 0
Top = 1200
Width = 4575
End
Begin VB.Label lblShow
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "URL :"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 360
TabIndex = 5
Tag = "6"
Top = 480
Width = 450
End
Begin VB.Label lblShow
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Path :"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 360
TabIndex = 4
Tag = "7"
Top = 1200
Width = 480
End
End
Attribute VB_Name = "frmAddDwn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
LoadResStrings Me
End Sub
Private Sub txtURL_Change()
With txtURL
If .Text <> "" And Left(.Text, 7) = "http://" And InStr(.Text, " ") = 0 Then
txtFile.Text = DownloadUrlToName(.Text)
End If
End With
End Sub
Private Sub cmdOK_Click()
If txtURL.Text = "" Or txtFile.Text = "" Then Beep: Exit Sub
frmMain.AddNewDwn txtURL.Text, txtFile.Text
cmdCnl_Click
End Sub
Private Sub cmdCnl_Click()
txtURL.Text = ""
txtFile.Text = ""
Unload Me
End Sub