0
我有這樣的腳本:「算術運算導致溢出」在Me.Invoke與多線程
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
在執行過程中,子接收到iNewProgress該值:,導致溢出:
系統.OverflowException未處理 Message =「算術運算導致溢出。」在System.Windows.Forms.Control.MarshaledInvoke(控制調用方,委託方法,對象[]參數,布爾同步) 來源= (Delegate method,Object [] args)