Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VFP] - Blank form
#1
I am testing the AntView control in Visual FoxPro 9. 
The object creates without OLE errors, but the control area remains completely blank even after navigating to a string.

PUBLIC oForm
oForm = CREATEOBJECT("Form")
oForm.Width = 600
oForm.Height = 400

oForm.AddObject("lblTest", "Label")
oForm.lblTest.Caption = "THIS TEXT IS COVERED BY THE BLANK BROWSER"
oForm.lblTest.AutoSize = .T.
oForm.lblTest.Visible = .T.

oForm.AddObject("oBrowser", "OLEControl", "AntViewAx2.Antview")
oForm.oBrowser.Width = 600
oForm.oBrowser.Height = 400
oForm.oBrowser.Visible = .T.

oForm.oBrowser.NavigateToString("<h1>Test</h1>")
oForm.Show()

Please note that my 30-day trial license has just expired.
What I am doing wrong?
Is the blank screen caused by the expired license, or is it a different issue?


Attached Files Thumbnail(s)
   
Reply
#2
Hi,

Thank you for your question.

That the demo expired is not related to your problem. 
The control remains fully functional, but you'll get a nag popup on navigation every now and then.

Your issue is that the NavigateToString method does not automatically send a CreateWebView whereas Navigate does.
Creating the control like you did, only creates the AntView ActiveX wrapper, in order for the WebView2 control to function, it needs to create background WebView2 processes. There are not started automatically when you use NavigateToString.
Sending CreateWebView starts those processes.

The solution to your problem is to send a CreateWebView before the NavigateToString.

Hope this helps,
--
Wil
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)