如何防止程式被重複執行

有網友問怎樣防止程式被複執行,其實很簡單,
只需要對App.PrevInstance屬性進行驗證便可以了,
true即程式已被執行。

e.g

Private Sub Form_Load()
If App.PrevInstance = True Then End
End Sub


上一頁