Contents - Index - Top


Deferral

Interface AntViewNewWindowRequestedEventArgs

 

Type: Property

Access: Read

Data Type: AntViewDeferral

 

 

Get a deferral object to defer the event.

 

You need to use this if you want to create a new AntView object on the fly. The creation of an AntView object is asynchronous and takes time to complete. This means that you can't do this during the OnNewWindowRequested event and wait for it.

So first you assign the Args parameter as returned by the the OnNewWindowRequested event to an AntViewNewWindowRequestedEventArgs object. A pre-existing object, so that ActiveX reference counting does not destroy the object at the end of the event.

Then also assign a (pre-existing) deferral object as well by taking the value of the Deferral (this) property.

The trick then is to create the new AntView object. Wait for it to complete, either via a timer of by hooking the OnCreateWebViewCompleted event and assign the NewWindow property to this AntView object and as this was the last thing to do, you then run complete.

 

 

Introduced in AntView release 1.1.236

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024