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 自定义弹出窗口

  • 吃鸡大逃杀游戏大全电脑端有哪些好玩吃鸡网游
  • 新世界怎么制作采集工具
  • 放置勇者英雄阵容搭配攻略
  • 电脑如何调节鼠标指针移动速度?
  • 绝地求生怎么购买钥匙
  • 热门搜索
    九死一生的意思 成人高考成绩什么时候出来 祖国永远祝福你 闭月羞花的意思 谆谆教诲是什么意思 教师节贺卡祝福语大全 下里巴人的意思 旅行箱什么材质好 雷锋什么时候去世的 新婚祝福词语