VBA组态动态化

dcount107:
 你好!再请教问题

 1、我想用VBA组态“状态显示”对象的属性的动态化,需要设置触发器。我试了下,标准周期比较好弄,但如果是变量触发该如何做?
 2、VBA可以组态事件吗,比如说“鼠标单击”事件?
 3、用WINCC做的监控软件运行后,如何保证它不被人为关闭?
  画面运行时,设置为全屏的。如何让它始终置前,而不会被“Alt+Tab”切换到其它程序?
 弹出MsgBox对话框后,如何做到:如果不关闭它,就不能点其它地方?

最佳答案

你好!不知道你有没有看VBA帮助,将代码稍作修改就可以用啊。
 1、变量触发就是创建直接连接的变量,并将其CycleType设置为有变化时即可。代码见:
 VBA for Automated Configuration -> VBA in the Graphics Designer -> Creating Dynamics with VBA -> Configuring Dynamics in the Properties of Pictures and Objects -> How to Dynamize a Property with Tag Connection

 2、可以组态事件,详见:
 VBA for Automated Configuration -> VBA in the Graphics Designer -> Creating Dynamics with VBA -> Configuring Event-Driven Actions with VBA -> How to Configure an Event-Oriented C Action with VBA或者How to Configure an Event-Oriented VB action with VBA

 3、WinCC Explorer  -> 计算机属性 -> 参数,将Alt+Tab等热键禁用。VBS的Msgbox本来就是模式的,C脚本需要获取WinCC句柄,相关问题见:http://www.ad.siemens.com.cn/service/answer/solution.asp?Q_id=26590&cid=1032
 

提问者对于答案的评价:
前两个问题我试验了,搞定了
 后面的再学习学习

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc275445.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2019年6月11日
下一篇 2019年6月11日

相关推荐