LiteView2 WebView2 VBA Enumerations — 13 Enums and All Constants
13 enums defining constants used across the LiteView2 API
Works in VBA (Excel, Access, Word, Outlook, PowerPoint, Visio, Project), VB6, VB.NET, C#, C++, Delphi, Python, PowerShell, AutoIt — and any COM host.
Flag enums (marked with Flags) can be combined using bitwise OR.
LiteView2BrowsingDataKinds Flags
Bitfield flags for ClearBrowsingData. Combine with OR (e.g., LV2_DATA_COOKIES Or LV2_DATA_CACHE_STORAGE).
| Constant | Value | Description |
|---|---|---|
| LV2_DATA_FILE_SYSTEMS | 1 | File systems |
| LV2_DATA_INDEXED_DB | 2 | IndexedDB |
| LV2_DATA_LOCAL_STORAGE | 4 | Local storage |
| LV2_DATA_WEB_SQL | 8 | Web SQL |
| LV2_DATA_CACHE_STORAGE | 16 | Cache storage |
| LV2_DATA_DOM_STORAGE | 32 | DOM storage |
| LV2_DATA_COOKIES | 64 | Cookies |
| LV2_DATA_ALL_SITE | 128 | All site data |
| LV2_DATA_DISK_CACHE | 256 | Disk cache |
| LV2_DATA_DOWNLOAD_HISTORY | 512 | Download history |
| LV2_DATA_GENERAL_AUTOFILL | 1024 | Autofill data |
| LV2_DATA_PASSWORD_AUTOSAVE | 2048 | Saved passwords |
| LV2_DATA_BROWSING_HISTORY | 4096 | Browsing history |
| LV2_DATA_SETTINGS | 8192 | Settings |
| LV2_DATA_ALL_PROFILE | 16384 | All profile data |
' Clear cookies and cache
m_lv.ClearBrowsingData LV2_DATA_COOKIES Or LV2_DATA_CACHE_STORAGE
LiteView2ResourceContext
Resource types for AddWebResourceRequestedFilter.
| Constant | Value | Description |
|---|---|---|
| LV2_RESOURCE_ALL | 0 | All resources |
| LV2_RESOURCE_DOCUMENT | 1 | HTML documents |
| LV2_RESOURCE_STYLESHEET | 2 | CSS |
| LV2_RESOURCE_IMAGE | 3 | Images |
| LV2_RESOURCE_MEDIA | 4 | Audio/Video |
| LV2_RESOURCE_FONT | 5 | Web fonts |
| LV2_RESOURCE_SCRIPT | 6 | JavaScript |
| LV2_RESOURCE_XHR | 7 | XMLHttpRequest |
| LV2_RESOURCE_FETCH | 8 | Fetch API |
| LV2_RESOURCE_TEXTTRACK | 9 | WebVTT |
| LV2_RESOURCE_EVENTSOURCE | 10 | Server-sent events |
| LV2_RESOURCE_WEBSOCKET | 11 | WebSocket |
| LV2_RESOURCE_MANIFEST | 12 | Web App manifests |
| LV2_RESOURCE_OTHER | 13 | Other |
LV2_FOCUS_REASON
Specifies the reason for a focus change.
| Constant | Value | Description |
|---|---|---|
| LV2_FOCUS_TABFORWARD | 0 | Tab forward |
| LV2_FOCUS_TABBACKWARD | 1 | Tab backward |
| LV2_FOCUS_PROGRAMMATIC | 2 | Programmatic focus |
LV2_POPUP_MODE
Controls how popup windows are handled.
| Constant | Value | Description |
|---|---|---|
| LV2_POPUP_ALLOW | 0 | Allow popups |
| LV2_POPUP_BLOCK | 1 | Block popups |
| LV2_POPUP_SAME_WINDOW | 2 | Open in same window |
LV2_LICENSE_STATE
Indicates the current license status.
| Constant | Value | Description |
|---|---|---|
| LV2_LICENSE_VALID | 0 | License valid |
| LV2_LICENSE_TRIAL | 1 | Trial mode |
| LV2_LICENSE_EXPIRED | 2 | License expired |
| LV2_LICENSE_INVALID | 3 | Invalid license |
LV2_COLOR_SCHEME
Sets the preferred color scheme for web content.
| Constant | Value | Description |
|---|---|---|
| LV2_COLOR_AUTO | 0 | Follow system |
| LV2_COLOR_LIGHT | 1 | Force light |
| LV2_COLOR_DARK | 2 | Force dark |
LV2_PRINT_ORIENTATION
Page orientation for printing and PDF export.
| Constant | Value | Description |
|---|---|---|
| LV2_PRINT_PORTRAIT | 0 | Portrait |
| LV2_PRINT_LANDSCAPE | 1 | Landscape |
LV2_TRACKING_PREVENTION
Tracking prevention level for the browser profile.
| Constant | Value | Description |
|---|---|---|
| LV2_TRACKING_NONE | 0 | No prevention |
| LV2_TRACKING_BASIC | 1 | Basic |
| LV2_TRACKING_BALANCED | 2 | Balanced |
| LV2_TRACKING_STRICT | 3 | Strict |
LV2_MEMORY_USAGE
Memory usage target level.
| Constant | Value | Description |
|---|---|---|
| LV2_MEMORY_NORMAL | 0 | Normal |
| LV2_MEMORY_LOW | 1 | Low memory target |
LV2_SCROLLBAR_STYLE
Scrollbar rendering style.
| Constant | Value | Description |
|---|---|---|
| LV2_SCROLLBAR_DEFAULT | 0 | Default scrollbar |
| LV2_SCROLLBAR_FLUENT_OVERLAY | 1 | Fluent overlay |
LV2_DOWNLOAD_DIALOG_CORNER_ALIGNMENT
Corner alignment for the download dialog.
| Constant | Value | Description |
|---|---|---|
| LV2_DOWNLOAD_CORNER_TOP_LEFT | 0 | Top left |
| LV2_DOWNLOAD_CORNER_TOP_RIGHT | 1 | Top right |
| LV2_DOWNLOAD_CORNER_BOTTOM_LEFT | 2 | Bottom left |
| LV2_DOWNLOAD_CORNER_BOTTOM_RIGHT | 3 | Bottom right |
LV2_PDF_TOOLBAR_ITEMS Flags
Bitfield flags for controlling PDF viewer toolbar visibility.
| Constant | Value | Description |
|---|---|---|
| LV2_PDF_NONE | 0 | No items |
| LV2_PDF_SAVE | 1 | Save button |
| LV2_PDF_PRINT | 2 | Print button |
| LV2_PDF_SAVE_AS | 4 | Save As button |
| LV2_PDF_ZOOM_IN | 8 | Zoom In button |
| LV2_PDF_ZOOM_OUT | 16 | Zoom Out button |
' Hide Save and Print buttons from PDF toolbar
m_lv.HiddenPdfToolbarItems = LV2_PDF_SAVE Or LV2_PDF_PRINT
LV2_BOUNDS_MODE
Controls how bounds coordinates are interpreted when embedding the browser.
| Constant | Value | Description |
|---|---|---|
| LV2_BOUNDS_RAW_PIXELS | 0 | Bounds are specified in raw pixels (default). The WebView2 control is positioned using raw pixel coordinates regardless of DPI scaling. |
| LV2_BOUNDS_RASTERIZATION_SCALE | 1 | Bounds use the rasterization scale. Coordinates are automatically adjusted for the current DPI/scaling factor of the display. |
' Use DPI-aware bounds
pool.SetBoundsMode browserIndex, LV2_BOUNDS_RASTERIZATION_SCALE