SCADA DIAView 自定义弹出窗口

 时间:2026-04-23 04:35:13

1、创建窗口0,并拖拽3个按钮

SCADA DIAView 自定义弹出窗口

2、创建窗口1,设置属性“背景”,“大小”

SCADA DIAView 自定义弹出窗口

3、创建变量,ButtonNumber 用于标记属于哪个按钮执行的窗口

SCADA DIAView 自定义弹出窗口

4、对应的脚本脚本事件如下:

1、窗口0 ==> 按钮“窗口1”==>事件==>左键按下

width=按钮0.Width


height=按钮0.Height
leftValue=按钮0.Left+width
topValue=按钮0.Top+height
Var.ButtonNumber=1
Call HMICmd.OpenDialogWindow("窗口1",1,true,leftValue,topValue)

2、窗口0 ==> 按钮“窗口2”==>事件==>左键按下

width=按钮1.Width


height=按钮1.Height
leftValue=按钮1.Left+width
topValue=按钮1.Top+height
Var.ButtonNumber=2
Call HMICmd.OpenDialogWindow("窗口1",1,true,leftValue,topValue)

3、窗口0 ==> 按钮“窗口3”==>事件==>左键按下 

width=按钮2.Width


height=按钮2.Height
leftValue=按钮2.Left+width
topValue=按钮2.Top+height
Var.ButtonNumber=3
Call HMICmd.OpenDialogWindow("窗口1",1,true,leftValue,topValue)

4、窗口1 ==> 按钮“确定”==>事件==>左键按下  

If Var.ButtonNumber=1 then


    MsgBox "执行按钮1需要的动作"
    HMICmd.CloseDialogWindow()
End If
If Var.ButtonNumber=2 then
    MsgBox "执行按钮2需要的动作"
    HMICmd.CloseDialogWindow()
End If
If Var.ButtonNumber=3 then
    MsgBox "执行按钮3需要的动作"
    HMICmd.CloseDialogWindow()
End If

5、窗口1 ==> 按钮“关闭”==>事件==>左键按下 

HMICmd.CloseDialogWindow()

5、点击“运行”按钮,查看运行效果

SCADA DIAView 自定义弹出窗口

  • 吃鸡大逃杀游戏大全电脑端有哪些好玩吃鸡网游
  • 新世界怎么制作采集工具
  • 放置勇者英雄阵容搭配攻略
  • 电脑如何调节鼠标指针移动速度?
  • 绝地求生怎么购买钥匙
  • 热门搜索
    月经什么时候来 甜不辣是什么 幸福感是什么 热桥是什么意思 淡水虾养殖技术 correct什么意思 马蜂养殖 淘宝什么东西最好卖 带电粒子在电场中的运动 水培风信子的养殖方法