WebBrowser control
The WebBrowser control can be used to create a Web browser that can
communicate between a Web page and the PowerBuilder client. For more about
using the WebBrowser control, see the section called “Working with WebBrowser” in Users Guide.
Note
This control cannot be referenced in .NET Web Service or .NET
Assembly components, otherwise the component will fail to be
deployed.
Properties
|
WebBrowser property |
Datatype |
Description |
|---|---|---|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Boolean |
Specifies whether the control has a border. Values
|
|
|
BorderStyle (enumerated) |
Specifies the style of the border of the control. StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to
|
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether users can use the right mouse When this property is |
|
|
String |
The URL address that the control opens by This property can only be set in the |
|
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the control is enabled (can send
|
|
|
Integer |
Specifies the height of the control, in |
|
|
Boolean |
Specifies whether the new page is opened in a new When this property is changed at runtime, |
|
|
Integer |
This property is currently unsupported for the |
|
|
String |
Specifies the tag value assigned to the |
|
|
Integer |
Specifies the transparency of the control. Value is |
|
|
Boolean |
Specifies whether the control is visible. Values
|
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
WebBrowser event |
Occurs |
|---|---|
|
When a frame’s address changes. |
|
|
(Unsupported by WebBrowser) |
|
|
When failed to validate the server |
|
|
Immediately before the Open event occurs in the |
|
|
Immediately after the Close event occurs in the |
|
|
Before a download begins. |
|
|
When the download status or progress information |
|
|
(Unsupported by WebBrowser) |
|
|
(Unsupported by WebBrowser) |
|
|
(Unsupported by WebBrowser) |
|
|
(Unsupported by WebBrowser) |
|
|
After the EvaluateJavascriptAsync function is |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
(Unsupported by WebBrowser) |
|
|
When the navigation fails or is |
|
|
When the overall page loading progress has |
|
|
After a navigation has been committed and before |
|
|
When the navigation state changes. |
|
|
When a Windows message occurs that is not a |
|
|
When the process of printing Web page as PDF is |
|
|
(Unsupported by WebBrowser) |
|
|
When a resource load is redirected. |
|
|
When the page title changes. |
Functions
You can use the global functions WebBrowserSet and WebBrowserGet to configure the
path, user agent and proxy settings for the WebBrowser control.
|
WebBrowser function |
Datatype returned |
Description |
|---|---|---|
|
Integer |
Cancels the downloading progress of |
|
|
String |
Returns the name assigned to the |
|
|
Integer |
Starts or ends the dragging of the |
|
|
Integer |
Executes JavaScript asynchronously. This function |
|
|
Integer |
Executes JavaScript synchronously. |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
String |
Gets the HTML source code for the current page’s |
|
|
Integer |
Goes back from the current page to the last page |
|
|
Integer |
Jumps from the current page to the next |
|
|
Integer |
Makes the object invisible. |
|
|
Integer |
Places the object in a new location specified by |
|
|
Integer |
Browses the specified page. |
|
|
Integer |
Suspends the downloading progress of |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Integer |
Prints the control. |
|
|
Integer |
Prints the current web page as PDF. |
|
|
Integer |
Refreshes the current page. |
|
|
Integer |
Registers the user defined event so that it can be User events can be defined |
|
|
Integer |
Changes the size of the control. |
|
|
Integer |
Resumes the downloading progress of files that were |
|
|
Integer |
Sets focus to the control. |
|
|
Integer |
Specifies the position of the control in the |
|
|
Integer |
Controls automatic redrawing of the control after |
|
|
Integer |
Makes the control visible. |
|
|
Integer |
Stops navigating the source. |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Object |
Returns the type of the control. |
|
|
Integer |
Unregisters the user defined event that is registered using the RegisterEvent function. |
|
|
Integer |
Scales the current view with the specified zoom |
Properties of Microsoft Web Browser OLE vs. WebBrowser
|
Microsoft Web Browser OLE |
WebBrowser |
|
Visible |
Visible |
|
Height |
Height |
|
Width |
Width |
|
N/A |
DefaultUrl ContextMenu PopupWindow Border BringToTop Enabled BorderStyle TabOrder Tag |
|
LocationUrl LocationName AddressBar Application Busy Container Document FullName FullScreen HWND Left MenuBar Name Offline Parent Path ReadyState RegisterAsBrowser RegisterAsDropTarget Resizable Silent StatusBar StatusText TheaterMode ToolBar Top TopLevelContainer Type |
N/A |
Events of Microsoft Web Browser OLE vs. WebBrowser
|
Microsoft Web Browser OLE |
WebBrowser |
|
Constructor |
Constructor |
|
NavigateError |
NavigationError |
|
BeforeNavigate2 |
NavigationStart |
|
StatustextChange (returns the |
NavigationStateChanged (returns |
|
TitleChange |
TitleTextChanged |
|
ProgressChange (returns the |
NavigationProgressIndex |
|
DownloadComplete |
DownloadingStateChanged |
|
N/A |
AddressChange ResourceRedirect PdfPrintFinished DownloadingStart |
|
DownloadBegin BeforeScriptExecute ClientToHostWindow CommandStateChange DocumentComplete FileDownload NavigateComplete2 NewProcess NewWindow2 NewWindow3 OnFullScreen OnMenuBar OnQuit OnstatusBar OnTheaterMode OnToolBar OnVisible PrintTemplateInstantiation PrintTemplateTeardown PrivacyImpactedStateChange PropertyChange RedirectXDomainBlocked SetPhishingFilterStatus SetSecureLockIcon ThirdPartyUrlBlocked UpdatePageStatus WebWorkerFinsihed WebWorkerStarted WindowClosing WindowSetHeight WindowSetResizable WindowSetLeft WindowSetTop WindowSetWidth WindowStateChanged |
N/A |
Functions of Microsoft Web Browser OLE vs. WebBrowser
|
Microsoft Web Browser OLE |
WebBrowser |
|
Navigate |
Navigate |
|
GoBack |
GoBack |
|
GoForward |
GoForward |
|
Refresh |
Refresh |
|
(in the right-click popup menu) |
PrintAsPDF |
|
ProgressChange |
(via NavigationProgressIndex event) |
|
N/A |
Zoom GetSource PauseDownload ResumeDownload CancelDownload StopNavigation |
|
AddressBar BeforeNavigate ClientToWindow CommandStateChange DownloadBegin DownloadComplete ExecWB FrameBeforeNavigate FrameNavigateComplete FrameNewWindow FullScreen GetProperty GoHome GoSearch Height Left MenuBar NavigateComplete NewWindow Offline PropertyChange PutProperty Int QueryStatusWB Quit RegisterAsBrowser RegisterAsDropTarget Resizable Silent ShowBrowserBar StatusBar StatusText StatusTextChange Stop TheaterMode TitleChange ToolBar Top Visible Width WindowActivate WindowMove WindowResize |
N/A |