Initialize Event  
 

The Initialize event occurs after the control has been created by the form, prior to the browser environment being initialized.

Syntax

Sub object_Initialize ( [Index As Integer] )

Remarks

This event occurs immediately after the form has created an instance of the control, but prior to the WebView2 browser being attached to the control window. This allows your application to set certain properties, such as the DataFolder and InPrivate properties, which cannot be changed after a browser environment has been created. In most cases, it's simpler to set these property values in design mode using the property browser; however, if you need to initialize these properties programatically, it must be done within this event.

See Also

DataFolder Property, InPrivate Property, Initialize Method