Solved

webbrowser control does not show image

Posted on 2016-10-29
9
59 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 40

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 34

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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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
 

Author Comment

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

751 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