Description
Configures the settings for the WebBrowser control. The global settings are also configured.
Note that some settings must be set before the WebBrowser control is initialized. These settings should be set in the application Open event.
Syntax
WebBrowserSet (string n, string v)
Argument |
Description |
---|---|
n |
The name of the setting that is case insensitive. The setting can be: ImportantThe following settings must be set before the window that contains the WebBrowser control is opened: RuntimeMode, FixedVersionRuntimePath, allow-file-access-from-files, UserDataFolder, Language, UserAgent, remote-allow-origins, and remote-debugging-port. It is recommended that you set them in the application Open event, or in any event that is triggered earlier than the window that contains the WebBrowser control is opened. The remote-allow-origins, and remote-debugging-port settings should be used only when the application is in the debug mode. For optimal performance, please comment out these settings when the application is not in the debug mode. If you have run the application (that includes the WebBrowser control) from PowerBuilder IDE, you may need to restart the application and the PowerBuilder IDE before the program can successfully initialize the WebBrowser control again.
|
v |
The value of the setting to be set.
|
Return value
Integer.
Returns 1 if the function succeeds and a negative value if an error occurs. If any argument's value is null, the method returns null.
Examples
The following example configures the language settings for the WebBrowser control in the application Open event.
long ll_Ret ll_Ret =WebBrowserSet("Language", "de-DE")
See also