Private Sub Timer1_Tick(sender As Object, e As EventArgs) 处理 tmrProcess.Tick Teller += 1
If teller Mod 75 = 0 Then
data = wrapper.GetCardData()
If Not data.FirstCard Is Nothing Then
tmrProcess.Stop()
Application.Exit()
tmrProcess.Enabled = False
End If
End If
Me.Hide()
If teller Mod 10 = 0 Then
Dim p() As Process
p = Process.GetProcessesByName("zScreenLocker")
If p.Count > 0 Then
lstHowBoDah.Items.Add("Process is running")
Else
lstHowBoDah.Items.Add("Process is not running")
Process.Start("\\secr14fs\Users$\fabian.lagaeysse\Documents\Visual Studio 2015\Projects\zScreenLocker\zScreenLocker\bin\Debug\zScreenLocker.exe")
Me.Close()
End If
End If
End Sub
这是我目前使用的。我同时使用 process.stop 和 timer.enable = false 的原因是它们都不起作用。我尝试了一切,但计时器继续运行并重新打开程序。越来越令人沮丧