防止多開 - 簡單版
Public Sub CheckExist(fm As Form)Dim title As String
If App.PrevInstance Then
title = App.title
Call MsgBox("文字", vbCritical)
App.title = "" '如此才不會Avtivate到自己
fm.Caption = ""
AppActivate title 'activate先前就已行的程序
End
End If
End Sub
Private Sub Form_Load()
Call CheckExist(Me)
End Sub
網路上找到的,自己測試是可以用的
頁:
[1]