1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| 'Déclaration
Private delegateAff As New delegateAffDlg(AddressOf UpdateAffichage)
'Sub D'affichage
Sub UpdateAffichage(ByVal iPBar As Integer, ByVal sTxt As String)
Try
With ProgressBar1
If .Value + iPBar < .Maximum Then
.Value += iPBar
Else
.Value = 0
End If
TextBox1.Text = sTxt
End With
Catch
End Try
End Sub
'Timer (1000ms)
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For i As Integer = 0 To 10
BeginInvoke(delegateAff, New Object() {5, "Essai : " & i.ToString})
Next
End Sub |
Partager