7,785
社区成员




Option Explicit
Private Sub Form_Load()
If App.PrevInstance Then
MsgBox "已开启一个进程,关闭这个"
End
End If
End Sub
dim objForm as Form
for each objform in forms
unload objform
next
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
SaveSetting App.EXEName, "section", "new", True
Sleep 1000
SaveSetting App.EXEName, "section", "new", False
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If GetSetting(App.EXEName, "section", "new", False) = True Then
'End 也可以,这里退出程序;
Unload Me
End If
End Sub