Has Purebasic upgraded the webgadget?

Just starting out? Need help? Post your questions and find answers here.
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Has Purebasic upgraded the webgadget?

Post by AlanFoo »

Hi experts,


I am using webgadget to help surf the Internet and many a time a page says , I am using an older version of the browser.

I am currently still using the Pubasic 4.5 .

Hope someone can advise if there is any upgrade of the web browsing engine since then?

Is there any plan to do so now that even Html5 is around the corner and Windows 8 is here.

PureBasic webgadget is a great tool ...

Hope for an answer.

Thanks

Alan
User avatar
TI-994A
Addict
Addict
Posts: 2705
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Has Purebasic upgraded the webgadget?

Post by TI-994A »

AlanFoo wrote:I am using webgadget to help surf the Internet and many a time a page says , I am using an older version of the browser...
Hi Alan. According to the PureBasic help, the WebGadget() makes use of the installed system browser, which in the case of Windows is Internet Explorer. So, it depends on the version of IE you have installed:
Remarks
The following components are required to use the WebGadget on each OS. These components are required to use the WebGadget, not only for the compilation of the program.

Windows
The WebGadget uses the Internet Explorer 4.0+ ActiveX object on Windows. This means that IE has to be installed (already present on Win98/Me and Win2000/XP). Furthermore, the active template library (ATL.dll) present in the PureBasic\Compilers\ directory is needed. This library is also usually present on modern Windows versions, but since it is not a system component it is safer to include the ATL.dll in the compiler's directory with your program.

As an alternative, the Mozilla ActiveX can be used instead (http://www.iol.ie/~locka/mozilla/mozilla.htm) if the #PB_Web_Mozilla flag is specified (the Mozilla ActiveX needs to be installed separately, it isn't bundled with FireFox or Mozilla). The ATL.dll is still needed in this case.
Upgrading your Internet Explorer might fix the problem.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Re: Has Purebasic upgraded the webgadget?

Post by AlanFoo »

TI-994A wrote:
AlanFoo wrote:I am using webgadget to help surf the Internet and many a time a page says , I am using an older version of the browser...
Hi Alan. According to the PureBasic help, the WebGadget() makes use of the installed system browser, which in the case of Windows is Internet Explorer. So, it depends on the version of IE you have installed:
Remarks
The following components are required to use the WebGadget on each OS. These components are required to use the WebGadget, not only for the compilation of the program.

Windows
The WebGadget uses the Internet Explorer 4.0+ ActiveX object on Windows. This means that IE has to be installed (already present on Win98/Me and Win2000/XP). Furthermore, the active template library (ATL.dll) present in the PureBasic\Compilers\ directory is needed. This library is also usually present on modern Windows versions, but since it is not a system component it is safer to include the ATL.dll in the compiler's directory with your program.

As an alternative, the Mozilla ActiveX can be used instead (http://www.iol.ie/~locka/mozilla/mozilla.htm) if the #PB_Web_Mozilla flag is specified (the Mozilla ActiveX needs to be installed separately, it isn't bundled with FireFox or Mozilla). The ATL.dll is still needed in this case.
Upgrading your Internet Explorer might fix the problem.
Hi TI-994A"

Thanks for the trouble to seek out solution.

I currently having IE9 9.0.8112.16421IC.

I will try to reinstall my IE and see what happens.

Thanks

Alan
User avatar
TI-994A
Addict
Addict
Posts: 2705
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Has Purebasic upgraded the webgadget?

Post by TI-994A »

AlanFoo wrote:I currently having IE9 9.0.8112.16421IC.
Hello again, Alan. Since you mentioned that your installed Internet Explorer version is 9.0, it clearly could not be the issue. So, I checked, and it seems that the Active Template Library (atl.dll) that PureBasic's WebGadget() uses is still based on IEv7 or earlier. You can run this snippet to verify this:

Code: Select all

wFlags = #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget
If OpenWindow(0, 0, 0, 800, 600, "WebGadget Version:", wFlags)
  WebGadget(0, 0, 0, 800, 600, "http://www.whatismybrowser.com/")
  While WaitWindowEvent() ! #PB_Event_CloseWindow : CloseWindow : Wend
EndIf
Some of the earlier forum posts recommended deleting atl.dll, but the WebGadget() doesn't seem to function without it.

Does anyone know if there is a way to obtain an updated or alternative template library?

Thanks in advance!
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Has Purebasic upgraded the webgadget?

Post by IdeasVacuum »

It seems that both the Microsoft and Mozilla DLLs are old, not up to date with their respective browsers. The one for FireFox has not been developed since 2005! MSDN is a bit difficult to navigate but it would seem that work on the atl.dll for IE ended at around the same time............
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Re: Has Purebasic upgraded the webgadget?

Post by AlanFoo »

Too bad .. it does seem to be the end of the road... no more update.

Yes, the ATL is based on IE7 ..

Regards
Alan
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Has Purebasic upgraded the webgadget?

Post by ts-soft »

The ATL.dll is only required on Win9X without IE4 or higher!
PB uses the comobject from installed IE, but if you have installed IE9, PB uses the
comobject from IE8 as Standard (this is a standard from MS and have nothing to do with PB)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Re: Has Purebasic upgraded the webgadget?

Post by AlanFoo »

ts-soft wrote:The ATL.dll is only required on Win9X without IE4 or higher!
PB uses the comobject from installed IE, but if you have installed IE9, PB uses the
comobject from IE8 as Standard (this is a standard from MS and have nothing to do with PB)
But then I am using IE9 on windows 7 but the result from http://www.whatismybrowser.com/
running it from webgadget seems to indicate it is reading from ATL.dll rather than from IE8 (unless you a way to do this?)

As Html5 codes are coming on stream, IE7 codes would really become obsolete.


Regards
Alan
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Has Purebasic upgraded the webgadget?

Post by IdeasVacuum »

PB uses the comobject from installed IE, but if you have installed IE9, PB uses the
comobject from IE8 as Standard (this is a standard from MS and have nothing to do with PB)
The WebGadget works well on my XP, but when using it to browse sites that have a mix of http and https, I get pop-ups about content to be displayed, yet I don't get them when using IE itself.

Edit: Could it be that the ATL.dll should be removed from the system?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
TI-994A
Addict
Addict
Posts: 2705
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Has Purebasic upgraded the webgadget?

Post by TI-994A »

ts-soft wrote:The ATL.dll is only required on Win9X without IE4 or higher! PB uses the comobject from installed IE...
IdeasVacuum wrote:...Could it be that the ATL.dll should be removed from the system?
PureBasic Manual wrote:WebGadget() - Windows
...IE has to be installed...the active template library (ATL.dll)...is needed...
Hi ts-soft & IdeasVacuum. Yes, I read that too, but the WebGadget() does not function without the atl.dll. So, clearly, it requires both Internet Explorer and atl.dll, as indicated in the PureBasic documentation.

If there's been no updates to the library in the last six or seven years, it'll probably be an issue that the PureBasic team has to tackle.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Has Purebasic upgraded the webgadget?

Post by ts-soft »

TI-994A wrote:Yes, I read that too, but the WebGadget() does not function without the atl.dll.
The ATL.dll is installed on all windows versions >Win9x! The webgadget runs fine without
the old ATL.dll from Compilers dir.

If it doesn't run on your system, your system have a problem :wink:

There is only a 32-Bit version (old ASCII version) in the compilers dir, if you right, how
works the WebGadget on x64? :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Re: Has Purebasic upgraded the webgadget?

Post by AlanFoo »

ts-soft wrote:
TI-994A wrote:Yes, I read that too, but the WebGadget() does not function without the atl.dll.
The ATL.dll is installed on all windows versions >Win9x! The webgadget runs fine without
the old ATL.dll from Compilers dir.

If it doesn't run on your system, your system have a problem :wink:

There is only a 32-Bit version (old ASCII version) in the compilers dir, if you right, how
works the WebGadget on x64? :wink:
Yes, you are right.

I deleted the atl.dll from purebasic directory, and recompiled it. The Webgadget still works. However the IE is still IE7 displayed using http://www.whatismybrowser.com/

Is there a Windows API equivalent for Purebasic's Webgadget?

Regards
Alan
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Re: Has Purebasic upgraded the webgadget?

Post by LuCiFeR[SD] »

alan, heres a tip for you. compile your executable with the webgaget.
add this to the registry, but remember to change the name of the .exe to your compiled exe name
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation]
"yourExecutableName.exe"=dword:00002328
just change the dword value to change browser version

00002328 =IE9
00001F40 =IE8

if you want more options MSDN is your friend :)
AlanFoo
Enthusiast
Enthusiast
Posts: 172
Joined: Fri Jul 24, 2009 6:24 am
Location: Malaysia

Re: Has Purebasic upgraded the webgadget?

Post by AlanFoo »

LuCiFeR[SD] wrote:alan, heres a tip for you. compile your executable with the webgaget.
add this to the registry, but remember to change the name of the .exe to your compiled exe name
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation]
"yourExecutableName.exe"=dword:00002328
just change the dword value to change browser version

00002328 =IE9
00001F40 =IE8

if you want more options MSDN is your friend :)
Thanks for your hints.

Am I right to save the codes into a .reg file and then double click on that and it will update the registry with the said values?

Big question.
Does this solution needs all our end users' registries to be changed accordingly?
Changing clients' registry setttings I try to avoid as much as I can.

Am not sure... but can the .reg be directy run from PB runprogram like runprogram("c:\sample.reg") and it will update the registry directly? Have not tried that yet. Will anti virus software stops it?

Regards
Alan







Regards
Alan
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Has Purebasic upgraded the webgadget?

Post by MachineCode »

There's plenty of code in these forums that show you how to silently modify the Registry without running a ".reg" file.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Post Reply