|    
			
				14/04/2013, 04:52
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: julio-2012 Ubicación: panama 
						Mensajes: 19
					 Antigüedad: 13 años, 3 meses Puntos: 0 |  | 
  |  Respuesta: Ejecutar Sub menu cada 5 minutos  
  Gracias Amigo por contestar. mira la aplicación consiste en realizar un ping a determinda IP verificado su estado (si esta conectada o desconectada) está operación la realiza el usuario presionando PingToolStripMenuItem. ahora bien lo que quiero es que  el boton PingToolStripMenuItem se auto ejecute cada 5 minutos. con el codigo que puse no puedo ponerlo andar lo puse a 5 segundos para ver mas rapido si se realizaba el auto ping.
 este es el codigo original que utilizo para realizar el ping.
 
 Private Sub PingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PingToolStripMenuItem.Click
 Counter = 0
 PingToolStripMenuItem.Enabled = False
 RenovarToolStripMenuItem.Enabled = False
 Dim NetworkSwitchList As List(Of NetworkSwitch) = GetSwitchListFromDGV()
 Threading.ThreadPool.SetMaxThreads(30, 400)
 For Each switchobject As NetworkSwitch In NetworkSwitchList
 Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback(AddressOf DoPing), switchobject)
 Next
 End Sub
 
 
 y este es el que tengo aprueba
 
 Private Sub PingToolStripMenuItem_load(sender As System.Object, ByVal e As System.EventArgs) Handles PingToolStripMenuItem.Click
 Timer.Interval = 10000
 Timer.Enabled = True
 AddHandler Timer.Tick, AddressOf Timer_Tick
 Timer.Start()
 Counter = 0
 PingToolStripMenuItem.Enabled = True
 CargarToolStripMenuItem.Enabled = False
 Dim NetworkSwitchList As List(Of NetworkSwitch) = GetSwitchListFromDGV()
 Threading.ThreadPool.SetMaxThreads(30, 400)
 For Each switchobject As NetworkSwitch In NetworkSwitchList
 Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback(AddressOf DoPing), switchobject)
 Next
 End Sub
 
 Private Sub Timer_Tick(sender As Object, ByVal e As EventArgs)
 Timer.Start()
 End Sub
 
 No se que este estoy haciendo mal.
     |