Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web browser and others
Message
From
05/06/2017 07:12:46
 
 
To
02/06/2017 07:10:03
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01651737
Message ID:
01651783
Views:
112
Hi Greg
Internet explorer originally have three kinds of automations
1.as activeX on a form communly called vfp browser (most recent oleclass="shell.explorer.2")
this is done by adding olecontrol object on the form.

2.as COM application: its a standalone web application done with createObject("internetexplorer.application")

Each solution have its PEM and can be drived as well.
historically ie have some problems .vfp browser was based on IE7 and then dont worked some times (retrieves too
errors because not supported things) with major versions of IE (ie8-9-10-11 and edge)
this behavior was solved by the emulation principe: any browser can work as any version of IE (for ex.ie11 or
edge whose are the most modern ones).
this was done by tweaking the registry or by adding a relative meta tag to the html code.this trick gives to vfp
browser a really second life and opens a great door for modern navigations.

3.IE can work with no security barriers as HTA (its an htm or html code with a particular header but saved as hta
file and opened with c:\windows\system32\mshta.exe.(can be done with shellexecute)
hta file is a window as form and can embed particulary local applications.
can google or read for this subject :
http://analystcave.com/vbs-hta-example-for-vba-developers/
https://technet.microsoft.com/en-us/scriptcenter/dd742317.aspx

Firefox never have any good COM object (one try of activeX never worked for me for old FF versions.it was no longer since).

can work with firefox as a full application from VFP
&&shellexecute
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                            STRING cOperation,;
                                            STRING cFileName,;
                                            STRING cParameters,;
                                            STRING cDirectory,;
                                            INTEGER nShowWindow

result = ShellExecute(0, "open", "firefox.exe","","",1)
can be also with same snippet for Iexplore.exe,chrome.exe....
can access to fullscreen from this code(senkey F11 for ex.)

Edge is exceptional browser (modern UI no exe !).it can be launched by a shortcut to jump to any url.
*this code launches microsoft edge with a specific URl

local m.lcURL,mcmdline
m.lcURl="http://www.yousfi.over-blog.com"
m.cmdline=" run/N cmd.exe /c start microsoft-edge:"+m.lcURl
&cmdline
All these above with applications examples can be found in my blog.

As recent developments there is Selenium working with some languages (see http://www.seleniumhq.org/projects/webdriver/)
i dont see any work from vfp on selenium and dont give a try to it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform