ot; & VBStrFormatByteSize(myCount.TotalSpeed) & " 字节/秒"
myProc.Value = 0
bolReady = True
If bolUnload = True Then
Unload Me
End If
bolUnload = True
On Error GoTo 0
Exit Sub
CopyErr:
MsgBox "系统错误:" & Err.Description, vbCritical
''''Resume
If lngFrom <> 0 Then CloseHandle lngFrom
If lngTo <> 0 Then CloseHandle lngTo
bolReady = True
If bolUnload = True Then
Unload Me
End If
On Error GoTo 0
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If bolUnload = False Then
bolUnload = True
bolStop = True
Cancel = True
Else
myIni.IniString("From") = textFrom.Text
myIni.IniString("To") = textTo.Text
Set myCount = Nothing
Set myIni = Nothing
End
End If
End Sub
Private Function VBStrFormatByteSize(ByVal lngSize As Long) As String
Dim strSize As String * 128
Dim strData As String
Dim lPos As Long
StrFormatByteSize lngSize, strSize, 128
lPos = InStr(1, strSize, Chr$(0))
strData = Left$(strSize, lPos - 1)
If lngSize > 1024 Then
strData = lngSize & "字节(" & strData & ")"
End If
VBStrFormatByteSize = strData
End Function
###############################################################################
dlgShutDown.frm 内容
###############################################################################
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form dlgShutDown
BorderStyle = 3 ''''Fixed Dialog
Caption = "关机"
ClientHeight = 3195
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6735
LinkTopic = "Form1"
MaxButton = 0 ''''False
MinButton = 0 ''''False
ScaleHeight = 3195
ScaleWidth = 6735
ShowInTaskbar = 0 ''''False
StartUpPosition = 2 ''''屏幕中心
Begin VB.Timer myTimer
Interval = 1000
Left = 6075
Top = 915
End
Begin MSComctlLib.ProgressBar myProc
Height = 390
Left = 180
TabIndex = 2
Top = 1980
Width = 6120
_ExtentX = 10795
_ExtentY = 688
_Version = 393216
Appearance = 1
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 375
Left = 4950
TabIndex = 1
Top = 2640
Width = 1215
End
Begin VB.CommandButton cmdShutDown
Caption = "关机"
Height = 375
Left = 3510
TabIndex = 0
Top = 2640
Width = 1215
End
Begin VB.Label lblTitle
Caption = "Label1"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline