Friend WithEvents Montimer as Timer with {.Interval = 1000}
Friend WithEvents Montimer as Timer with {.Interval = 1000}
Friend WithEvents Montimer As New System.Timers.Timer(1000)
Option Strict On Imports System.Threading Class A Friend WithEvents CB As New B Friend WithEvents Montimer As New System.Timers.Timer(5000) Sub A1() CB.Start() End Sub Sub CB_End() Handles CB.End MsgBox("Evenement bien déclanché") '--> Jusque la tout marche Montimer.Start() End Sub Sub MonTimerTick(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Montimer.Elapsed MsgBox("Le Timer est bien lancé") '--> Eh bien non je n'ai rien, ou juste une msgbox et puis plus rien End Sub End Class Class B Private Thread2 As Threading.Thread Public Event [End]() Sub Start() Thread2 = New Thread(AddressOf B1) Thread2.Start() End Sub Sub B1() RaiseEvent [End]() End Sub End Class
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question