Static ts As Date = Date.Now
If Windows.Forms.Form.ActiveForm IsNot Nothing Then
ts = Date.now
Else
Dim sp As TimeSpan = Date.now - ts
If sp.TotalSeconds > 9 Then
Syscmd.Project.Exit(False)
End If
End If
为何会报错?
改为
If system.Windows.Forms.Form.ActiveForm IsNot Nothing Then