Page 1 of 2

Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 10:28 am
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

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 10:58 am
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.

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 12:03 pm
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

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 2:02 pm
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!

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 2:29 pm
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............

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 3:25 pm
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

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 3:32 pm
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)

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 3:40 pm
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

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 3:45 pm
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?

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 4:45 pm
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.

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 5:04 pm
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:

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 5:14 pm
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

Re: Has Purebasic upgraded the webgadget?

Posted: Fri Nov 02, 2012 7:08 pm
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 :)

Re: Has Purebasic upgraded the webgadget?

Posted: Sat Nov 03, 2012 3:42 am
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

Re: Has Purebasic upgraded the webgadget?

Posted: Sat Nov 03, 2012 3:47 am
by MachineCode
There's plenty of code in these forums that show you how to silently modify the Registry without running a ".reg" file.