SalQuickHTML
Namespace: PPJ.Runtime.Windows.QO
Assembly: PPJ.Runtime.50 (5.0.0.0)
Hosts an HTML browser with Quick Objects navigation methods and optional toolbars.
- C#
- VB.NET
public class SalQuickHTML : SalUserControl
Public Class SalQuickHTML
Inherits SalUserControl
Example:
using PPJ.Runtime.Windows.QO;
var viewer = new SalQuickHTML();
viewer.HomePage = "https://example.com";
viewer.ShowAddressBar = true;
Constructors
SalQuickHTML()
Initializes the browser control and its toolbar components.
Properties
AddressBar
ToolStrip: Gets the toolbar containing the address input.
AllowBrowserDrop
Boolean: Gets or sets the stored browser drag-and-drop preference. (Default: False)
The preference is applied during browser navigation processing where supported.
BrowserEmulation
Int32: Gets or sets the browser emulation value for the current executable.
Values below 7000 are ignored. Assigning a new value updates the current user's FEATURE_BROWSER_EMULATION registry entry; registry failures are suppressed.
BrowserName
String: Gets or sets the stored browser name compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
FromName
String: Gets or sets the stored sender identity compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
HomePage
String: Gets or sets the address loaded by GoHome. (Default: "")
LinkColor
Int32: Gets or sets the stored unvisited-link color compatibility value.
This property stores a value without applying it to the embedded browser.
LinkFollowedColor
Int32: Gets or sets the stored visited-link color compatibility value.
This property stores a value without applying it to the embedded browser.
LoadImages
Boolean: Gets or sets the stored image-loading preference compatibility value. (Default: True)
This property stores a value without applying it to the embedded browser.
PageURL
String: Gets or sets the stored page address compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
ProxyPort
Int32: Gets or sets the stored proxy port compatibility value. (Default: 0)
This property stores a value without applying it to the embedded browser.
ProxyServerName
String: Gets or sets the stored proxy server name compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
SaveDirectory
String: Gets or sets the stored download directory compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
SearchPage
String: Gets or sets the address loaded by GoSearch. (Default: "")
ShowAddressBar
Boolean: Gets or sets whether the address bar is visible. (Default: True)
ShowStatusBar
Boolean: Gets or sets whether the status bar is visible. (Default: True)
ShowToolbar
Boolean: Gets or sets whether the command toolbar is visible. (Default: True)
ShowToolbarBack
Boolean: Gets or sets whether the Back button is visible. (Default: True)
ShowToolbarCopy
Boolean: Gets or sets whether the Copy button is visible. (Default: True)
ShowToolbarCut
Boolean: Gets or sets whether the Cut button is visible. (Default: True)
ShowToolbarForward
Boolean: Gets or sets whether the Forward button is visible. (Default: True)
ShowToolbarHome
Boolean: Gets or sets whether the Home button is visible. (Default: True)
ShowToolbarOpen
Boolean: Gets or sets whether the Open button is visible. (Default: True)
ShowToolbarPaste
Boolean: Gets or sets whether the Paste button is visible. (Default: True)
ShowToolbarRefresh
Boolean: Gets or sets whether the Refresh button is visible. (Default: True)
ShowToolbarSearch
Boolean: Gets or sets whether the Search button is visible. (Default: True)
ShowToolbarStop
Boolean: Gets or sets whether the Stop button is visible. (Default: True)
Statusbar
StatusBar: Gets the browser control's status bar.
Toolbar
ToolStrip: Gets the toolbar containing navigation and editing commands.
UserAgent
String: Gets or sets the embedded browser session's user-agent string.
Empty values are ignored. Assigning a different nonempty value updates URLMON session settings.
UserName
String: Gets or sets the stored user name compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
UserPassword
String: Gets or sets the stored user password compatibility value. (Default: "")
This property stores a value without applying it to the embedded browser.
WebBrowser
WebBrowser: Gets the embedded Windows Forms browser instance.
Methods
Dispose(disposing)
Detaches the application-idle handler and releases base control resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | Whether managed resources are being disposed. |
EnumLinks(sLinks, sText)
Extracts link destinations and labels from the current HTML source.
| Parameter | Type | Description |
|---|---|---|
| sLinks | SalArray<SalString> | Receives the link destinations. |
| sText | SalArray<SalString> | Receives the corresponding link labels. |
Returns: SalNumber. The number of extracted links.
GetCurrentURL(sURL)
Copies the cached current navigation address into a SAL string.
| Parameter | Type | Description |
|---|---|---|
| sURL | SalString | The navigation address, or the output address for GetCurrentURL. |
Returns: SalNumber. The cached address character count.
GetPageTitle(sTitle)
Copies the document title into a SAL string.
| Parameter | Type | Description |
|---|---|---|
| sTitle | SalString | Receives the document title; unchanged by the Web implementation. |
Returns: SalNumber. The title character count.
GetSource(sHTML)
Copies the browser's HTML source into a SAL string.
| Parameter | Type | Description |
|---|---|---|
| sHTML | SalString | Receives the HTML source. |
Returns: SalNumber. The source character count.
GetStatus()
Reads the embedded browser's readiness state.
Returns: SalNumber. The numeric WebBrowserReadyState value.
GoHome()
Loads the address configured in HomePage.
Returns: SalNumber. Zero after requesting navigation.
GoSearch()
Loads the address configured in SearchPage.
Returns: SalNumber. Zero after requesting navigation.
OnLoad(e)
Initializes the browser at runtime and sends QOM_ControlCreate.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The load event data. |
Starts at about:blank when no address is set and subscribes to idle toolbar updates.
PageBackward()
Requests the preceding page in browser history.
Returns: SalNumber. Zero.
PageCancel()
Stops the current browser load.
Returns: SalNumber. Zero.
PageForward()
Requests the following page in browser history.
Returns: SalNumber. Zero.
PageLoad(sURL)
Requests navigation to an address.
| Parameter | Type | Description |
|---|---|---|
| sURL | SalString | The navigation address, or the output address for GetCurrentURL. |
Returns: SalNumber. Zero after requesting navigation.
PageOpen()
Displays a file picker and loads the selected HTML, image, or XML file.
Returns: SalNumber. Zero, including when the file picker is canceled.
PageReload()
Refreshes the current browser document.
Returns: SalNumber. Zero.
SetSource(sPath, sSource)
Writes HTML into the current browser document.
| Parameter | Type | Description |
|---|---|---|
| sPath | SalString | Reserved for compatibility; ignored. |
| sSource | SalString | The HTML markup to display. |
Returns: SalNumber. Zero after writing the HTML.
Requires an available document. The path argument is ignored.
Implements
| Name | Description |
|---|---|
| ISalWindow | Exposes SAL message dispatch and runtime metadata for child controls, forms, dialogs, and MDI windows. |