Update Browser-Engine used by WebGadget()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Update Browser-Engine used by WebGadget()

Post by PureLust »

Hi Fred,

would it be possible for you to update the Browser-Engine used by PBs WebGadget()?

Sites like Google-Maps do not work with this old Implementation (Error: "Sie verwenden offenbar einen nicht unterstützten Browser."):

Code: Select all

URL.s = "https://www.google.com/maps/"

OpenWindow(0,0,0,1000,600,"Browser Test", #PB_Window_SystemMenu | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
WebGadget(0,0,0,1000,600,URL)

While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
An Implementation of Chromium would be fantastic but a newer Version of IE (or Edge) would be fine too.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Update Browser-Engine used by WebGadget()

Post by IdeasVacuum »

What's needed is the actual engine. PB uses WebKit for Mac and Linux, this is what we need on Windows.
The Midori Browser, for example, is based on WebKit and has a Windows version.
Midori Browser
WebKit
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Re: Update Browser-Engine used by WebGadget()

Post by GPI »

By default, the webgadget use for compatiblity reasons a very old version. You can change this, by adding a Regestry-Key!
https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Maybe purebasic should automatic add this key and remove it on Program exit.

__________________________________________________
URL tags added
26.04.2017
RSBasic
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Update Browser-Engine used by WebGadget()

Post by IdeasVacuum »

This is the full link:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Looks complicated? In an ideal world, your app would not change a Customer's settings since other apps they use could be affected.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Re: Update Browser-Engine used by WebGadget()

Post by GPI »

It isn't complicated, simple add a registry entry with the execute name as key:
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION
mypurebasic.exe = (DWORD) 11000

And it will use IE11 instead of very-old-ie. Maybe Purebasic should do this automatically?
bzw:

Code: Select all

WebGadget(#gWeb_Twitch,5,5,100,100,"about:blank")
MyWebGadget.IWebBrowser2=GetWindowLong_(GadgetID(#gWeb_Twitch),#GWL_USERDATA)
MyWebGadget\put_Silent(#True) ; Suppress JavaScript error messages.
Will disable the error-messages :)

but i think the best solution would be, to use webkit in windows, so the compatiblity between Max, Linux and Windows-Version would be the best.
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 340
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Re: Update Browser-Engine used by WebGadget()

Post by ar-s »

Even IE11 is starting to be usefull..
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
Post Reply