mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / Settings Object / enable_high_dpi_support Property
In This Topic
    enable_high_dpi_support Property
    In This Topic
    Description

    Enables High DPI support for both the ActiveX host process and CEF3 processes.

    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property enable_high_dpi_support As Boolean
    Return Type

    Boolean, default is false.

    Remarks

    WebKitX ActiveX is an in-process ActiveX Control that uses out-of-process CEF3 processes for rendering HTML5.

    If you wish to support High DPI monitors you must enable High DPI support to both your executable and CEF3 executables.

    To enable High DPI support for both your executable host process and CEF3 you need to set this property to true.

    However, this might affect your other components in your Forms; typically you should enable Hidh DPI support when your application starts, either programmatically or by using a Manifest. As a curtsey for legacy programming languages, WebKitX API provides method EnableHighDPISupport that can be called when your application starts.

    Please note that High DPI support is not possible from within legacy IDE such as Visual Basic 6.0, and you should really enable it in compiled executables only.

    Example
    Option Explicit
    
    Private Sub Form_Load()
    
        ' Enable High DPI support in current process.
        ' This will work with compiled executable but not VB6 IDE
        
        'WebKitX1.EnableHighDPISupport
        
    End Sub
    
    Private Sub Form_Resize()
        On Error Resume Next
        WebKitX1.Move 0, 0, ScaleWidth, ScaleHeight
        Err.Clear
    End Sub
    
    Private Sub WebKitX1_OnCreate(ByVal Settings As WebKitXCEF3Lib.ISettings, CommandLineSwitches As String)
        
        Settings.plugins = False
        Settings.cache_path = App.Path + "\MyCache"
        Settings.application_cache = App.Path + "\MyAppCache"
        Settings.persist_session_cookies = 1
        Settings.persist_user_preferences = 1
        
        ' Enable High DPI support on both current process and CEF3
        Settings.enable_high_dpi_support = True
        
        CommandLineSwitches = "" 'defaults
        
    End Sub
    
    Private Sub WebKitX1_OnBrowserReady()
        WebKitX1.Open "https://www.google.com"
    End Sub
    See Also