Class Window2 Dim dt As DispatcherTimer = New DispatcherTimer() Private Sub Window_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) _ Handles MyBase.Loaded AddHandler dt.Tick, AddressOf dispatcherTimer_Tick dt.Interval = New TimeSpan(100000) dt.Start() End Sub Private Sub dispatcherTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) If MouseAction.None Then dt.stop() Me.Close() CommandManager.InvalidateRequerySuggested() End If End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)