2
I have a code that checks if the application is running, if it is not running, the code starts the application, if it is and it passes... But he does it just qnd I run for the 1° time. I qria q he checked every 5 seconds.. *Vb.net
code:
Sub Main()
Dim activo As Boolean
Dim myprocesses As Process()
myprocesses = Process.GetProcessesByName("check")
If myprocesses.Length > 0 Then
activo = True
Else
activo = False
Dim p As New ProcessStartInfo("check.exe")
p.WindowStyle = ProcessWindowStyle.Hidden
p.CreateNoWindow = True
Process.Start(p)
End If
System.Console.ReadKey()
End Sub
Could you explain better what’s going on? Show what you’re trying to do? That is, show your code to help people understand what you want.
– Asura Khan
I edited, like this, I qro that every 5 seconds the code I edited up there runs. 1-I STARTED THE APPLICATION, 2-CHECKED, 3-PASSED 5 SECOND, 4-CHECKED... and so on
– Lusasd