Difference between revisions of "ZH/Documentation/BASIC Guide/Other Functions (Runtime Library)"

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: {{DISPLAYTITLE:其他函数({{OOo}} 运行时库)}} {{ZH/Documentation/BASICGuideTOC/v2 |ShowPrevNext=block |ShowPrevPage=block |PrevPage=Documentation/BASIC Guide/Message and Input Bo...)
 
Line 3: Line 3:
 
|ShowPrevNext=block
 
|ShowPrevNext=block
 
|ShowPrevPage=block
 
|ShowPrevPage=block
|PrevPage=Documentation/BASIC Guide/Message and Input Boxes (Runtime Library)
+
|PrevPage=ZH/Documentation/BASIC Guide/Message and Input Boxes (Runtime Library)
|NextPage=Documentation/BASIC Guide/API Intro
+
|NextPage=ZH/Documentation/BASIC Guide/API Intro
 
|runtime=block
 
|runtime=block
 
}}
 
}}
Line 60: Line 60:
  
 
{{PDL1}}
 
{{PDL1}}
 +
{{InterWiki_Languages_BasicGuide|articletitle=Documentation/BASIC Guide/Other Functions (Runtime Library)}}
 
{{InterWiki_Languages_BasicGuide|articletitle=Documentation/BASIC Guide/Other Functions (Runtime Library)}}
 
{{InterWiki_Languages_BasicGuide|articletitle=Documentation/BASIC Guide/Other Functions (Runtime Library)}}

Revision as of 22:07, 12 December 2008

doc OOo
Book.png

Beep

Beep 函数导致系统播放一种声音,可用于警告用户执行了错误的操作。Beep 不使用任何参数:

Beep     ' creates an informative tone

Shell

可以使用 Shell 函数启动外部程序。

Shell(Pathname, Windowstyle, Param)

Pathname 定义要执行的程序的路径。

Windowstyle 定义用于启动程序的窗口。

可以使用以下值:

  • 0 - 程序获得焦点并在隐藏的窗口中启动。
  • 1 - 程序获得焦点并在正常大小的窗口中启动。
  • 2 - 程序获得焦点并在最小化窗口中启动。
  • 3 - 程序获得焦点并在最大化窗口中启动。
  • 4 - 程序在正常大小的窗口中启动,但没有获得焦点。
  • 6 - 程序在最小化窗口中启动,焦点保留在当前窗口中。
  • 10 - 程序在全屏模式下启动。

第三个参数 Param 允许将命令行参数传送到要启动的程序。

Wait

Wait 函数使程序执行终止指定的时间。等待时间是以毫秒为单位指定的。命令

Wait 2000

指定中断 2 秒(2000 毫秒)。

Environ

Environ 函数返回操作系统的环境变量。根据系统和配置情况,此处可以保存各种类型的数据。以下调用可确定操作系统临时目录的环境变量:

Dim TempDir
TempDir=Environ ("TEMP")
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools