標題: 防止多開 - 簡單版 [打印本頁] 作者: xeaiow 時間: 2012-8-14 02:30 標題: 防止多開 - 簡單版 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