去除系统边框:
更改(主程序-app.xml)文件
找到<systemChrome>和<transparent>改为
<systemChrome>none</systemChrome>
<transparent>true</transparent>
并在(主程序.mxml)文件中对<s:WindowedApplication/>标签添加属性 showStatusBar="false"
systemManager.stage.displayState = StagedisplayState.FULL_SCREEN_INteraCTIVE;
设置窗口最大化:
NativeApplication.nativeApplication.activeWindow.maximize();
另: NativeApplication.nativeApplication.exit(); //退出
NativeApplication.nativeApplication.activeWindow.close(); //退出
NativeApplication.nativeApplication.activeWindow.minimize(); //最小化
NativeApplication.nativeApplication.activeWindow.startMove(); //开始拖动
其中NativeApplication.nativeApplication可直接写成nativeApplication
如项目报错NativeApplication.nativeApplication.activeWindow为null,可在调用该对象之前加上
this.activate(); 用于激活NativeWindow
获取屏幕分辨率:
Capabilities.screenResolutionX //屏幕的最大水平分辨率
Capabilities.screenResolutionY//屏幕的最大垂直分辨率