Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternatives of old IE methods
#14
(2022-08-30, 10:17:06)wila Wrote: Hi,

Thank you for your questions.
I will try to answer them below.

When adding the control to a form and docking it horizontally to both sides, the width of all webpages are larger than the form itself. How can we prevent this from happening?

Can you try the following?


For me when I last tested it in MS Access that made the AntView control have the expected width.

In Internet Explorer there was an option to execute commands by calling browser.ExecWB. Is there any equivalent in Antview?

No, sorry, there is no ExecWB for WebView2.
In the WebView2 world everything is handled by Javascript. This opens up a lot more possibilities, but it is quite a mind shift from the old mshtml and ExecWB way of doing things.

is there an easier way to get the html source of the current page? We use it it many places and right now we'll have to execute an event and catch it in another (RequestCurrentHtml). In IE we could simply call browser.document.body

The default way of working with the WebView2/AntView control is asynchronous.
This is the recommended way and is most flexible.
However, as this is sometimes problematic with legacy programming languages we have started on implementing synchronous wrapper functions to make it easier to communicate with the control.
The RequestCurrentHtml function has a synchronous variant RequestCurrentHtmlSync which directly returns the html of the current page.

Can we request the state of the browser? In IE this would be browser.readystate.

This works completely different in WebView2. You would be looking at the OnNavigationCompleted event (or likely the OnNavigationCompletedHex variant as I doubt that MS Access supports Int64 data types) in order to see if a document is completely loaded.

Hope this helps,
--
Wil

I was trying out requestcurrenthtmlsync  I'm running antview 1.1.200.0 
 I'm getting an error 426 - OLE error code 0x80020006: Unknown name.
My code:
LOCAL lctext
lcText = thisform.obrowser.RequestCurrentHtmlSync
STRTOFILE(lctext, "AntView.txt")

Fairly straight forward , I must be missing something
Thanks Patrick
Reply


Messages In This Thread
Alternatives of old IE methods - by hsacrm - 2022-08-30, 07:34:20
RE: Alternatives of old IE methods - by wila - 2022-08-30, 10:17:06
RE: Alternatives of old IE methods - by Patrickb - 2022-11-03, 20:10:42
RE: Alternatives of old IE methods - by hsacrm - 2022-08-30, 13:05:33
RE: Alternatives of old IE methods - by wila - 2022-08-30, 17:12:07
RE: Alternatives of old IE methods - by hsacrm - 2022-08-31, 07:32:58
RE: Alternatives of old IE methods - by wila - 2022-08-31, 11:02:56
RE: Alternatives of old IE methods - by hsacrm - 2022-09-09, 14:00:43
RE: Alternatives of old IE methods - by wila - 2022-09-10, 17:45:32
RE: Alternatives of old IE methods - by hsacrm - 2022-09-12, 06:39:00
RE: Alternatives of old IE methods - by wila - 2022-09-12, 12:44:00
RE: Alternatives of old IE methods - by wila - 2022-09-13, 22:20:57
RE: Alternatives of old IE methods - by hsacrm - 2022-09-14, 13:01:42
RE: Alternatives of old IE methods - by wila - 2022-09-14, 14:02:43
RE: Alternatives of old IE methods - by wila - 2022-11-03, 21:02:38
RE: Alternatives of old IE methods - by Patrickb - 2022-11-15, 20:12:43
RE: Alternatives of old IE methods - by wila - 2022-11-15, 22:54:47
RE: Alternatives of old IE methods - by Patrickb - 2022-11-16, 15:41:16
RE: Alternatives of old IE methods - by wila - 2022-11-16, 16:08:59

Forum Jump:


Users browsing this thread: 1 Guest(s)