Web browser for desktop and device

tsteward

Well-Known Member
Licensed User
Longtime User
Cool I'll give it a try,
Thank you


You can use the Door library, that is what it is meant for, adding "one off "things to standard libraries. obj1 is a Door library Object.
B4X:
Sub App_Start
  obj1.New1(false)
  ...
End Sub
...
   obj1.value = WebBrowser.ControlRef
   obj1.RunMethod("Refresh")
 

N1c0_ds

Active Member
Licensed User
Congrats for the library, it works perfectly!

However I'd like to remove the context menu. Since I just need the control to display pre-defined HTML text, I don't want the user to be able to get the favorites.

Do you have any solution for me?
 

bish0p

Member
Licensed User
Longtime User
Hi agraham,

I have been using your web browser.dll for a while and have just recently upgraded my phone to a HT Touch Pro which uses Opera as the Default browser. Is there a way to tell teh library to Use PIE and not the default browser?

Thanks
 

agraham

Expert
Licensed User
Longtime User
Is there a way to tell teh library to Use PIE and not the default browser?
What makes you think it is not using PIE? I have an HTC Diamond, also with Opera as the default browser, but the WebBrowser.dll still uses the PIE engine - you can tell from the press and hold context menu which is PIE and not Opera.

I would be very surprised if it were otherwise as WebBrowser.dll uses the .NET WebBrowser control which is a wrapper over the native Microsoft WebBrowser ActiveX control which is part of PIE.
 

bish0p

Member
Licensed User
Longtime User
What makes you think it is not using PIE? I have an HTC Diamond, also with Opera as the default browser, but the WebBrowser.dll still uses the PIE engine - you can tell from the press and hold context menu which is PIE and not Opera.

I would be very surprised if it were otherwise as WebBrowser.dll uses the .NET WebBrowser control which is a wrapper over the native Microsoft WebBrowser ActiveX control which is part of PIE.

B4X:
FileOpen(c1,AppPath&"\cacheinfo.htm",cWrite)
FileWrite(c1,t)
FileClose(c1)
   
web.Navigate("File://"&AppPath&"\cacheinfo.htm")   
CACHEINFOFORM.Show

In the above code as soon as the web.Navigate is called Opera opens and navigates to the page. Atg least on my HTC Touch Pro wich is just out of the box. The only app I have installed on it is mine.
 

agraham

Expert
Licensed User
Longtime User
web.Navigate("File://"&AppPath&"\cacheinfo.htm")
What I think is happening is that because you have specified a file the WebBrowser is calling the app associated with that file extension to open that file rather than trying to display it itself. The default app for htm files is Opera. If I try that with a htm file on my Diamond my WebBrowser window stays empty but Opera opens. If I do that with a jpg then the Picture Viewer opens as this is the default for jpgs.
 

bish0p

Member
Licensed User
Longtime User
What I think is happening is that because you have specified a file the WebBrowser is calling the app associated with that file extension to open that file rather than trying to display it itself. The default app for htm files is Opera. If I try that with a htm file on my Diamond my WebBrowser window stays empty but Opera opens. If I do that with a jpg then the Picture Viewer opens as this is the default for jpgs.

when I tried pushing the HTML to the browser component the page was not always displayed properly. I will try again with 6.5
 

tsteward

Well-Known Member
Licensed User
Longtime User
Browser not working correctly

:sign0137: There is a bug somewhere.

When I create the program below it works on the PC but when compiled and put onto the pda (WM6.1) it will only display the first image. :(

Can someone tell me how to correct this? :confused:
My program is ready for a full release bar this problem.

PLEASE help.

B4X:
Sub Globals
    'Declare the global variables here.

End Sub

Sub App_Start
 Form1.Show
 web.New1("form1",1,1,200, 200)
 HtmStr = "<html><head><title>homepage</title></head><body>" & CRLF
 HtmStr = HtmStr & "<p><img src='file://\Storage Card\My Documents\Image1.jpg'></p>"
 HtmStr = HtmStr & "<p><img src='file://\Storage Card\My Documents\Image2.jpg'></p>"
 HtmStr = HtmStr & "</body></html>"
 web.DocumentText=HtmStr
End Sub
 

tsteward

Well-Known Member
Licensed User
Longtime User
I have been told this works on other pda's.

Can anyone please confirm.
 

larrytango

Member
Licensed User
Longtime User
I'm afraid not. Why would you want to anyway?

there is a website i want to be able to view on phone that redirects depending on the browser (as in it will work if i use chrome etc , but not if i use opera or ie )

so no way to do this as of yet :(
 

chanppc

Member
Licensed User
What I think is happening is that because you have specified a file the WebBrowser is calling the app associated with that file extension to open that file rather than trying to display it itself. The default app for htm files is Opera. If I try that with a htm file on my Diamond my WebBrowser window stays empty but Opera opens.

Is there a workaround for the above if I want to display a local htm file with this control? For testing purpose, I removed the htm file association with opera & it work, but I'm thinking how to avoid this on other ppc :sign0085:
 

HARRY

Active Member
Licensed User
Longtime User
Hallo,

I make a very simple use of the WebBrowser on the device. I only want to show a map, just with the possibility to zoom and to shift:
web.url = "http://maps.google.com/maps?q=" & Latitude & "," & Longitude

It works fine, but still I have two questions;

1) In fact I only want to see the map, but I get a lot of other information. I 'solved' this problem by oversizing the web control and setting top and left to a negative value. The result is acceptable. Does an 'official' solution exist ?

2) The zoom in and zoom out controls as well as the shift controls are very small; you cannot operate them with your fingers, even with the pen is difficult.
However, when I use googlemaps.exe calling for the same map, there are much better controls: + and - are useable with your fingers and the map can be shifted just by putting your finger on it and move.

Should I use another web.url statement; possibly with more parameters? Or does another solution exist to get with the WebBrowser the user interface of GoogleMap.exe?


Harry
 

mjcoon

Well-Known Member
Licensed User
Should I use another web.url statement; possibly with more parameters? Or does another solution exist to get with the WebBrowser the user interface of GoogleMap.exe?

When I run "http://maps.google.com/" in PIE (on my WM5.0 device) it is presenting me with a PDA version of Google Maps web site. At the bottom of the screen it shows a choice of "Mobile" (greyed-out) and "Classic" (as a link). The "Classic" option is not usable.

But as you say there's lots of extra stuff appropriate to doing Google searches.

I notice that there is also a "View in Google Maps?" link which does (since I have GoogleMaps.exe installed) what it says!

I think that if you use a service like Google you have to accept whatever they generate and feed to you. From their point of view they don't need to offer effectively the same thing two different ways...

Mike.
 

RacingDog

Active Member
Licensed User
Graham, if you can spare a moment for the grumpy old git, I just downloaded this library and tried running your two samples in the IDE. When I try the Choice function and select one of the presented choices, the device version works, though I'm not sure where the displayed page comes from! (I'm not into HTML etc either). The URL is shown as about:ChoiceN where N is etc. But the desktop version gives me a "This program cannot display the webpage" error! The URL is shown as http://ChoiceN/, which is probably the reason!

I'm in W7 + IE8 (.Net2.0 is native to W7)

Cheers,
Baffled of Fleet
 
Last edited:

agraham

Expert
Licensed User
Longtime User
I have to admit that I have forgotten why I put that HTML fragment in there. It relies on the browser behaviour when the browser sees a non-existent target in a link tag.

On Vista with IE8 it works fine. I wonder if it is a security thing in your case. Have you tried running it as Administrator?
 

RacingDog

Active Member
Licensed User
Ah right, that makes sense, good old defaults.

I tried compiling and running as admin, same difference.

I use AptDiff, another useful freebie, so, just in case, I just this minute stuck the two files into that to make the differences stand out. Hmm. The embedded HTML is where the different behaviour comes from. I think I'll have a quiet play with what the differences program is telling me and see what happens. Not right this minute, 'cos I haven't started the crossword yet, and it's one of the Guardian's tougher setters today, and I still have to get out for my daily afternoon fix of company by going to the bookies! But watch this space as they say.
 
Top