VDS Renaissance 的界面提供多种语言。官方文档以英语维护,以确保提供统一、一致且始终最新的参考。
BROWSER dialog element
Syntax
DIALOG ADD, BROWSER,<name>,<top>,<left>,<width>,<height>,<url>,<tooltip>,<styles>
Requires
EXTERNAL VDSBRW60.DLL (VDSBRW50.DLL [VDS5])
#DEFINE COMMAND,BROWSER
#DEFINE FUNCTION,BROWSER
Description
This dialog element can be used to display HTML documents in an application. It uses a component of the Microsoft Internet Explorer web browser (version 5.01 or later required.) HTML documents may be loaded from a file on disk, a web server or from a resource compiled into the program.
The <name> parameter specifies the name of the dialog element. The <top>, <left>, <width> and <height> values specify its position on the dialog, and its size.
The <url> parameter specifies the filename, web address or resource name. Resources can be loaded using a special form of URL: res://%0/<resource name> where %0 is replaced by the path of the executable file. This special form of URL can be used anywhere a file is referenced within the HTML itself (for example, a style sheet, a graphical image, a hyperlink to another HTML document.)
The <tooltip> parameter is included for consistency with other dialog elements. However, the BROWSER dialog element does not display the tooltip, because Internet Explorer uses them for its own purposes. You can display tooltips for elements of the loaded HTML document using ALT text attributes.
HTML documents may be loaded into the browser element at runtime using the DIALOG SET command, which may specify a file (disk file, web page or resource) or a string containing the HTML code. The source code of the currently loaded HTML document may be obtained using the function @DLGTEXT.
The BROWSER dialog element is an external dialog element. The VDSBRWxx extension must be loaded by the program, and packaged with all compiled executable files. The external command BROWSER and function @BROWSER may be required to use all of the functionality of the element.
Note: Due to the way the interface of the web browser component has been implemented by Microsoft, not all of its functionality is available to a Visual DialogScript application. Also, keys such as Tab and Enter only work within the DialogScript application itself, and cannot be used to move within the HTML document.
Styles
The following styles may be used with this dialog element:
| OFFLINE | Set the global status to "offline". This setting may be changed at runtime using the command DIALOG SET, <element name>, ONLINE | OFFLINE. |
| NOIMAGES | Do not display any image files. |
| NOVIDEOS | Do not display any video animations. |
| NOMUSIC | Do not play any music files. |
| NOSCRIPTS | Do not execute any scripts. |
| NOJAVA | Do not run any Java applets. |
| NOACTIVEX | Do not use any ActiveX components. |
| NONEWWINDOWS | Do not open any new windows. (This will prevent a user opening the HTML document in a new Internet Explorer window by shift+clicking it.) |
| NONAVIGATE | Do not allow navigation to another document (by clicking on a hyperlink.) An <element name>NAVIGATE event will be generated. The target URL may be determined after this event using the function @BROWSER(NAVURL). This allows hyperlinks within an HTML document to be used to trigger events within a DialogScript program. |
| NOFILEDOWNLOADS | Do not allow any file downloads. |
| NODIALOGS [VDS6] | Do not show any Internet Explorer dialogs (such as script error messages.) |
| NOPOPUPMENU [VDS6] | Do not display an Internet Explorer context menu when the user right-clicks on the browser element. An <element name>POPUP event will be generated. This event can be used by an application to display its own popup menu using DIALOG POPUP. To ignore the right-click altogether, do nothing when this event occurs. |