Private Sub Form_load() if app.PrevInstance=True then msgbox "该程序已经启动" unload me exit sub end if End Sub