Solved

webbrowser control does not show image

Posted on 2016-10-29
9
33 Views
Last Modified: 2016-11-01
Hi -

I am using the webbrowser control to show bing maps and it works on several of my forms.

Now I need to develop a new form that is specifically used to just show the map, like a pop-up.

I am using a string as source for the map and the string looks OK and the string is:

http://bing.com/maps/embed/viewer.aspx?cp= 11.9316666666667~-15.7816666666667&lvl=19dir=90&sty=a&w=700&h=600

I try to use a normal browser and it shows, with the string, the convenient output, albeit at a much larger scale

but in the web browser control is pure white...

the control has the following code on form load event:

Private Sub Form_Load()


    ' buscar a imagem satélite do ponto
    Dim strGPSMarcacao, _
        strTextGPSCoord As String
       
    Lat = Forms![_commonVariables]![currentLat]
    Lgt = Forms![_commonVariables]![currentLgt]
    zoom = Forms![_commonVariables]![currentZoom]
   
    textGPSCoord = Str([Lat]) & "~" & Str([Lgt])
   
    strGPSMarcacao = "http://bing.com" & "/maps/embed/viewer.aspx?cp=" & [textGPSCoord] & "&lvl=" & zoom
    strGPSMarcacao = strGPSMarcacao & "dir=90&sty=a&w=700&h=600 "
    Debug.Print strGPSMarcacao

    Me.fld_InfoSatelite.Requery

End Sub

Screen-Shot-2016-10-29-at-18.43.55.png
can anyone help?
0
Comment
Question by:jirdeaid
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 250 total points
ID: 41865672
Try this code (I can't check your variables, so try with constant values, then return to variables):
Private Sub Form_Load()
Dim strGPSMarcacao, _
        strTextGPSCoord As String
Dim Lat As Double, Lgt As Double, zoom As Double
    'Lat = Forms![_commonVariables]![currentLat]
    Lat = 11.9316666666667
    
    'Lgt = Forms![_commonVariables]![currentLgt]
    Lgt = -15.7816666666667
    
    'zoom = Forms![_commonVariables]![currentZoom]
    zoom = 19
    
    strTextGPSCoord = Str([Lat]) & "~" & Str([Lgt])
    
    strGPSMarcacao = "http://bing.com/maps/embed/viewer.aspx?cp=" & strTextGPSCoord & "&lvl=" & zoom
    strGPSMarcacao = strGPSMarcacao & "dir=90&sty=a&w=700&h=600 "
    Debug.Print strGPSMarcacao

    Me.fld_InfoSatelite.ControlSource = "=" & Chr(34) & strGPSMarcacao & Chr(34)
    Me.fld_InfoSatelite.Requery

End Sub

Open in new window

0
 
LVL 32

Expert Comment

by:ste5an
ID: 41865830
Call Navigate:

fld_InfoSatelite.Navigate strGPSMarcacao

Open in new window

0
 

Author Comment

by:jirdeaid
ID: 41866003
Hi Thanks!
to  ste5san -- I can't understand... there is no Navigate method for the object :(
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 41866058
Have been down this road before...took me hours and hours to find the solution.

It's the compatibility mode setting on the web browser control.   It emulates IE 7 by default, which won't display Bing maps.

 Note that Bing showing up as a white page can happen on a normal station to, and for a reason besides this (bug in a registry entry for the cache settings - solution for that is here https://www.experts-exchange.com/questions/28918929/Bing-maps-only-works-if-in-private-browsing-enabled.html#a41443561 ).

The best registry key to set this with is:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

as this doesn't require admin rights, but you can set it on the local machine key as well.

 Under that Key, enter a DWORD key of MSACCESS.EXE and set the value to 0x00002711 (10001)

 You also might want to consider switching to Google Maps.

Jim.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:jirdeaid
ID: 41866171
thanks jim!
0
 
LVL 39

Expert Comment

by:als315
ID: 41867451
@jirdeaid: Do you need more help or it is time to close question?
0
 

Author Comment

by:jirdeaid
ID: 41868301
well - I THOUGHT it was close. But I can't find a close button as in the good old days....
0
 
LVL 57
ID: 41868369
<<well - I THOUGHT it was close. But I can't find a close button as in the good old days....>>

 They moved it to the bottom left.   No one finds it down there.   :(

Jim.
0
 

Author Comment

by:jirdeaid
ID: 41868404
these ideas made to confuse me....
I am closing now!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now