Shell Function

Shell aloittaa toisen sovelluksen ja määrittelee vastaavan ikkunatyylin, mikäli tarpeen.

Syntaksi:

Shell (Pathname As String[, Windowstyle As Integer[, Param As String[, bSync]]])

Parametrit:

Polun_nimi

Name of the program that you want to start, optionally with complete path and/or arguments.

Ikkunatyyli

Optional integer expression that specifies the style of the window that the program is executed in.

note

Parameter Windowstyle is only effective on Windows systems. On other systems the parameter is ignored.


The following values are possible:

Windowstyle

Meaning

0

kohdistus piilossa olevassa ohjelmaikkunassa

Not implemented in LibreOffice.

1

kohdistus vakiokokoisessa ohjelmaikkunassa

Not implemented in LibreOffice.

2

kohdistus pienennetyssä ohjelmaikkunassa

3

kohdistus suurennetussa ohjelmaikkunassa

4

vakiokokoinen ohjelmaikkuna, ei kohdistusta

Not implemented in LibreOffice.

6

pienennetty ohjelmaikkuna, kohdistus säilyy aktiivisessa ikkunassa

Not implemented in LibreOffice.

10

Täysruutunäyttö


note

Windowstyle 3 and 10 are equivalent in Windows systems.


Param1

String that specifies additional arguments passed to the program.

bSync

Jos tämä parametri asetetaan true-arvoksi, Shell-komento ja kaikki LibreOffice-ohjelmiston tehtävät odottavat, kunnes shell-prosessi on päättynyt. Kun parametri on false-arvoinen, shell-funktio palaa välittömästi. Oletusarvona on false.

Virhekoodit:

5 Virheellinen proseduurikutsu

53 Tiedostoa ei löydy

73 Ei käytössä

Esimerkki:


Sub ExampleShellForWin
    Shell("c:\windows\calc.exe",2)
End Sub

Please support us!