

MyProcess = Process.Start("c:\notepad.exe") ' thrd = New Thread(AddressOf startTimer) ' myProcess.WaitForExit(MyWaitTime) 'Tried this but caused my program to go "not responding" TimerINterval += 1 ' Counts my iterations StrTempPrevailUsername = strPrevailUserProfile(i) 'Need an If numeber of loops = 1 to not continute Private Sub btnStartSync_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStartSync.Click ' thrd = New Thread(AddressOf TheSyncMustStart) ' if i thread program never enters loops. TheSyncMustStart() '= Not threaded timer never tics ' Me.WindowState = FormWindowState.Minimized Private Sub Form2_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ShownĪddHandler timer2.Tick, AddressOf Timer2_Tick Public myProcess As ĭim WithEvents timer2 As New Public blnStopMyProcess As Boolean = False

If i thread the process it neverĭoes as its suppose to.

I have a process that i call, if it doesnt end within a certain time, i want the process to be killed and the loop to only continue after this. I have been fighting this one for too long.
