Contents - Index - Top


Using AntView in PowerBuilder

 

 

The PowerBuilder examples that are provided with AntView are by default installed under the path:

C:\Users\Public\Documents\AntView2\Examples\PowerBuilder

These examples have been built with PowerBuilder 2019 R3.

 

Once you compile and run you get the following start screen:

 

You can then either start each PowerBuilder example by clicking on the button, or open the help page for each example by clicking on the little "(i)" button behind it.

The help pages are:

 

 

Setting global defaults

 

You can create the AntViewGlobal object with the following code:

 

int i

OLEObject o

o = CREATE OLEObject

i = o.ConnectToNewObject("AntViewAx2.AntViewGlobal") // i should be 0

 

You can then change defaults for all your AntView controls.

 

 

As PowerBuilder does not natively support Int64 data types, there are workarounds available when the WebView2 control returns a variable that is of data type Int64. 

Since we can't just cut off the data to fit in Int32, we instead encode the data as hexadecimal and pass that as a string.

 

The option for doing this is by setting the EventsUseHexadecimal property to true.

The example code below is using the AntViewGlobal object, but it could also be set per AntView object.

 

o.EventsUseHexadecimal  = true

 

or for example if you would want to disallow GPU hardware acceleration then you could use:

 

o.AdditionalBrowserArguments  = "--disable-gpu"

 

 

Handling of events

 

PowerBuilder can make use of all of the events that are being triggered from the main interface as found under the events here: AntView interface.

 

Sadly PowerBuilder has no capability built-in to access events that are not part of the main interface, for example the OnGetCookieList event in the AntViewCookieManager interface.

 

When you bump into this as a PowerBuilder developer, please let us know and we'll work with you to see if we can find a solution.

For the OnGetCookieList event issue, we wrote the GetCookiesAsJsonSync method to enumerate the list of cookies and GetCookieSync to provide direct access to the cookie objects.

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 11/05/2025