Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VFP9] antview.settings not giving CoreWebView2Settings
#1
Hello dear folks at antwise,

i am happily using antview in our commercial product as an embedded oauth2 experience and it works marvelous in our VFP9 SP2 based program.

Now i would like to extend the usage of antview to displaying PDFs as the webviewer2 is quite capable with that. This works also great.

BUT... there's always one ;-) 

For changing the default PDF-Toolbar i would need to access to the CoreWebView2Settings.HiddenPdfToolbarItems.

After reading documentation I suspected that antview.settings is offereing access to the interface or class of CoreWebView2Settings. When the view is fully initiated antview.settings suggesting it is an object. But this object has no props, no nothing and any try to "set" or access any props or interfaces that might existing on that, is running me into a wall off OLE errormessages.

Given a fully running antview with a displayed pdf showing just fine, i try the following (very simplified):

Code:
local loSettings
loSettings = thisform.antview.settings
loSettings.HiddenPdfToolbarItems = 1

Line 2 works fine and debugger at least shows an object type. But loSettings does not show any object-Props at all at that point.
Line 3 will, when executed, come up with a pretty hard OLE error and c000....05 bringing the test to a screeching halt.

The c00...05 Error in VFP is usually a desatrous mishap in memory-access and only one step away from "instant implosion" of the VFP-instance. So no luck on that end.

Several variations (including trying the get hold of the interface itself with GETINTERFACE(...) ) later it still did not work out. 

So i am giving up and try to get help here.

Any hint, info or help on how to access and use the CoreWebView2Settings Interface in VFP9 using antview1 or antview2 (we have lics for both of them  Big Grin )
The endgoal is simply to alter the CoreWebView2Settings.HiddenPdfToolbarItems to switch Buttons on the PDF-Toolbar on/off.

But in the end the other CoreWebView2Settings-Props/Classes are pretty interesting too  Cool

Thanks and best regards and
met vriendelijke groeten uit Bremerhaven

Michael
Reply


Messages In This Thread
[VFP9] antview.settings not giving CoreWebView2Settings - by LOGO Datensysteme - 2025-08-27, 21:23:49

Forum Jump:


Users browsing this thread: 1 Guest(s)