退出iFIX系统代码

Private Sub Btn_Exit_Click()

If MsgBox(“Want to exit the application? “, vbExclamation + vbYesNo, “Quit system”) = vbYes Then

Dim hw As Long, cnt As Long

hw = FindWindow(“iFix Startup”, vbNullString)

If hw = 0 Then

hw = FindWindow(“iFix Startup – DEMO MODE”, vbNullString)

End If

If hw <> 0 Then

‘Send close message to windows

cnt = SendMessage(hw, &H10, 0, 0&)

End If

End If

End Sub

徐大军

发表评论

电子邮件地址不会被公开。 必填项已用*标注