OpenPageWithPos

Navigation:  组态系统介绍 > 脚本应用 > 系统函数 >

OpenPageWithPos

Previous pageReturn to chapter overviewNext page

 

 

函数说明:

   OpenPageWithPos strPageName,lLeft,lTop,lWidth,lHeight

   在主视图中指定位置打开一个页面。

   strPageName:页面名称,字符串;

   lLeft,lTop,lWidth,lHeight:分别为左坐标、上坐标、宽、高,整型;

   无返回值。

   如 sys.OpenPageWithPos "b.bsp",100,200,500,500

 

举例:

   在a.bsp的画面中加载一个Button对象,在脚本编辑器中编辑该Button的Click事件如下:

   Sub BSButton1_OnClick()

       sys.OpenPageWithPos "b.bsp",100,200,500,500

   End Sub

   运行a.bsp画面,点击Button,b.bsp在左坐标100,上坐标200的位置打开,并且宽度和高度为500。