Shell Function

Khởi chạy một ứng dụng khác và xác định kiểu dáng cửa sổ tương ứng, nếu cần thiết.

Syntax:

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

Parameters:

Pathname

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

Windowstyle

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

Tiêu điểm ở cửa sổ chương trình bị ẩn.

Not implemented in LibreOffice.

1

Tiêu điểm ở cửa sổ chương trình theo kích cỡ tiêu chuẩn.

Not implemented in LibreOffice.

2

Tiêu điểm ở cửa sổ chương trình bị thu nhỏ.

3

Tiêu điểm ở cửa sổ chương trình đã phóng to.

4

Cửa sổ chương trình có kích cỡ tiêu chuẩn, không có tiêu điểm.

Not implemented in LibreOffice.

6

Cửa sổ chương trình bị thu nhỏ, tiêu điểm còn lại ở cửa sổ đang hoạt động.

Not implemented in LibreOffice.

10

Hiển thị trên toàn màn hình.


note

Windowstyle 3 and 10 are equivalent in Windows systems.


Param

String that specifies additional arguments passed to the program.

bSync

Nếu giá trị này được đặt thành true (đúng), thì lệnh Shell và tất cả các công việc LibreOffice sẽ đợi đến khi tiến trình trình bao chạy xong. Còn nếu giá trị này được đặt thành false (sai), thì trình bao trả về trực tiếp. Giá trị mặc định là false.

Error codes:

5 Sai gọi thủ tục

53 Không tìm thấy tập tin 53 Không tìm thấy tập tin 53 Không tìm thấy tập tin 53 Không tìm thấy tập tin 53 Không tìm thấy tập tin 53 Không tìm thấy tập tin

73 Tính năng chưa được thực hiện

Example:


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

Please support us!