HMI programming package 用VB编程 如何退出APP
试了几种方法都不行。
如红色代码示意:
Function State_Changed(ByVal Action As String, ByVal newstate As Integer, ByVal oldstate As Integer) As Integer
Select Case oldstate
Case 0
Select Case Action
Case "0"
'Write_Dialog ("selected 0 button")
Case "1"
'Write_Dialog ("selected 1 button")
Case "2"
'Write_Dialog ("selected 2 button")
Case "13"
'Write_Dialog ("SAVE")
Case "14"
'Write_Dialog ("Abort")
Case "15" 'Exit APP
'QueryForShutdown CONTEXT_REGIE_EXIT
'Unload OEMFRM0
End
End Select
Case 1
Select Case Action
Case "13"
'Write_Dialog ("SAVE1")
Case "14"
'Write_Dialog ("Abort1")
Case "15"
'Write_Dialog ("Back")
End Select
End Select
End Function
直接写 End 如上面红色代码示意
代码执行时
按下Exit按钮APP退出但是HMI死机了,regie 状态如下图示:
![](/club/bbs/upload/image/20181010/6367479917500743747102457.JPG)
![](/club/bbs/upload/image/20181010/6367479920379594746409166.JPG)
请各位老师指导一下,谢谢!