J'ai ce script:"opération arithmétique conduit à débordement" dans Me.Invoke avec multithreading
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
Pendant l'exécution, le sous reçoit en iNewProgress cette valeur: qui overflow:
système .OverflowException was unsledled Message = "L'opération arithmétique a entraîné un débordement." Source = " System.Windows.Forms" StackTrace: à System.Windows.Forms.Control.MarshaledInvoke (appelant contrôle, méthode délégué, Object [] args, synchrone Boolean) à System.Windows.Forms.Control.Invoke (Méthode Delegate, Object [] args)