API version 1

- 10

getDesktopWidth

メインディスプレイのデスクトップの水平方向のサイズを取得します。

取得するサイズは、画面全体からシステムのタスクバーやアプリケーションのツールバーが占有する領域を除いた部分です。

呼出形式一覧

呼出形式

説明

integer getDesktopWidth()

デスクトップの水平方向のサイズを取得します。

戻り値一覧

戻り値

説明

integer

デスクトップの水平方向のサイズ(ピクセル)

例外

なし

関連項目

getDesktopHeight メソッド



使用例 CRSダウンロード

Form frmFrameWindow {
   X = 0;
   Y = 0;
   Width = 600;
   Height = 400;

   Button button1 {
           x = 20;
           y = 16;
           width = 100;
           height = 40;
           title = "画面サイズ確認";
           function onTouch(e) {
                   var fw = //.getFrameWindow();
                   var dtpWidth = fw.getCurrentDesktopWidth();
                   var dtpHeight = fw.getCurrentDesktopHeight();
                   messageBox("現在Biz/Browserがいるデスクトップ = " + str(dtpWidth) + " x " + str(dtpHeight)) ;

                   dtpWidth = FrameWindow.getDesktopWidth();
                   dtpHeight = FrameWindow.getDesktopHeight();
                   messageBox("メインディスプレイのデスクトップ = " + str(dtpWidth) + " x " + str(dtpHeight)) ;
           }
   }
   Label Label12 {
           x = 20;
           y = 80;
           width = 132;
           Height = 20;
           Value = "statusBar(左下を確認)";
   }
   Label Label13 {
           x = 160;
           y = 80;
           Width = 95;
           Height = 20;
           Value = "menuBar";
   }
   Label Label14 {
           x = 290;
           y = 80;
           Width = 95;
           Height = 20;
           Value = "tabMulti";
   }
   Label Label15 {
           x = 440;
           y = 80;
           Width = 95;
           Height = 20;
           Value = "tabAutoHide";
   }
   OptionButton optStatus {
           x = 20;
           y = 110;
           Width = 112;
           Height = 45;
           useChange = false;

           OptionItem OptionItem1[2] {
                   Height = 20;
                   width = 82;
                   x = 12;
                   y = 2;
                   this[0].title = "false";
                   this[1].title = "true";
           }
           Function OnChange( e ) {
                   var fw = //.getFrameWindow();
                   fw.statusBar=e.from.value;
           }
   }

   OptionButton OptionButton1 {
           x = 150;
           y = 110;
           Width = 99;
           height = 46;
           Border = BORDER_FLATSUNKEN;

           OptionItem OptionItem1[2] {
                   Height = 20;
                   Width = 81;
                   Y = 1;
                   x = 9;
                   this[0].title = "false";
                   this[1].title = "true";
           }
           Value = 0;
           Function OnTouch( e ) {
                   var xd = new XmlDocument();
                   xd << xml <<-
                           <?xml version="1.0" encoding="SHIFT_JIS"?>
                           <menudefine>
                                   <menu title="ファイル">
                                           <menuitem id="11" title="トップ" />
                                           <separator />
                                           <menuitem id="18" title="設定" />
                                           <menuitem id="19" title="終了" />
                                   </menu>
                                   <menu title="業務">
                                           <menuitem id="31" title="日報入力" />
                                           <menuitem id="32" title="出勤入力" />
                                           <menuitem id="33" title="販売管理" />
                                   </menu>
                                   <menu title="マスタ管理">
                                           <menuitem id="91" title="ユーザー情報">
                                           </menuitem>
                                   </menu>
                           </menudefine>
                   ->>;

                   var fw = //.getFrameWindow();
                   fw.setMenu(xd);
                   fw.menuBar=e.from.index;
           }
   }

   OptionButton optTabMulti {
           x = 280;
           y = 110;
           Width = 115;
           Height = 44;
           useChange = false;

           OptionItem OptionItem1[2] {
                   Height = 20;
                   width = 87;
                   x = 11;
                   this[0].title = "false";
                   this[1].title = "true";
           }
           Function OnChange( e ) {
                   var fw = //.getFrameWindow();
                   fw.tabMulti=e.from.value;
           }
   }
   OptionButton optTabAutoHide {
           x = 430;
           y = 110;
           Width = 115;
           Height = 44;
           useChange = false;

           OptionItem OptionItem1[2] {
                   Height = 20;
                   this[0].title = "false";
                   this[1].title = "true";
                   Width = 106;
                   x = 4;
           }
           Function OnChange( e ) {
                   var fw = //.getFrameWindow();
                   fw.tabAutoHide=e.from.value;
           }
   }

   Button btnWindow {
           x = 20;
           y = 208;
           Width = 135;
           Height = 31;
           Title = "STATE_FULLSCREEN";

           Function OnTouch( e ) {
                   var fw = //.getFrameWindow();
                   fw.SetWindowState(windowObject.STATE_FULLSCREEN);
           }
   }

   Button btnWindow1 {
           x = 20;
           y = 243;
           Width = 135;
           Height = 31;
           Title = "STATE_RESTORE";

           Function OnTouch( e ) {
                   var fw = //.getFrameWindow();
                   fw.SetWindowState(windowObject.STATE_Restore);
           }
   }

   Label Label4 {
           x = 45;
           y = 185;
           Width = 106;
           Height = 17;
           Value = "フル画面表示";
   }

   var fw = //.getFrameWindow();
   optStatus.value = fw.statusBar;
   optTabMulti.value = fw.tabMulti;
   optTabAutoHide.value = fw.tabAutoHide;
   optStatus.useChange = true;
   optTabMulti.useChange = true;
   optTabAutoHide.useChange = true;
}