【发布时间】:2011-01-29 08:49:38
【问题描述】:
我有这个脚本:
Private Sub WebDL_AmountDownloadedChanged(ByVal iNewProgress As Long) Handles WebDL.AmountDownloadedChanged
'On Error Resume Next
If downloading Then
Dim wbchanged As New WDL_AmountDownloadedChanged(AddressOf WebDLAmountChanged)
Me.Invoke(wbchanged, New Object() {CLng(iNewProgress)})
End If
End Sub
在执行过程中,sub 将这个值接收到 iNewProgress 中,这会导致溢出:
System.OverflowException 未处理 Message="算术运算导致溢出。" 源="系统.Windows.Forms" 堆栈跟踪: 在 System.Windows.Forms.Control.MarshaledInvoke(控制调用者,委托方法,对象 [] 参数,布尔同步) 在 System.Windows.Forms.Control.Invoke(委托方法,Object[] args)
【问题讨论】:
标签: vb.net multithreading overflow