原贴 http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=152101&page=3
我的下载代码:
......
For Each dr As DataRow In DataTables("Sys_附件").DataRows '逐行下载附件
Dim pts() As String = dr.SQLGetValue("CRC值").Split("|")
fl= fld & "\" & dr("文件名")
If FileSys.FileExists(fl) AndAlso CRCCheckFile(fl) = pts(1) Then '如果本地存在同名文件且CRC校验值相同
'则直接使用本地文件-----------------
Else '否则从数据库提取文件
If dr.SQLLoadFile("附件",fl) = False Then '如果提取文件失败
Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
counts += 1
End If
Next
If counts > 0 Then
Dim Result As DialogResult
Result = MessageBox.Show("成功下载了【 " & counts & " 】个附件!!!,是否合并文件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
......
多线程代码:
Dim int As Integer = ShowWaitDialog(New Operation(Function() As Integer
Dim j As Integer = 0
For i As Integer = 0 To 5
System.Threading.Thread.Sleep(1000)
j += i
Next
Return j
End Function), Nothing)
e.Form.Controls("TextBox1").text = int
我想在我的下载代码中使用等待窗,该怎么改???
[此贴子已经被作者于2022/11/26 23:18:42编辑过]