Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

webbrowser control does not show image

Posted on 2016-10-29
9
Medium Priority
?
66 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:João serras-pereira
[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 1000 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 35

Expert Comment

by:ste5an
ID: 41865830
Call Navigate:

fld_InfoSatelite.Navigate strGPSMarcacao

Open in new window

0
 

Author Comment

by:João serras-pereira
ID: 41866003
Hi Thanks!
to  ste5san -- I can't understand... there is no Navigate method for the object :(
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 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:João serras-pereira
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:João serras-pereira
ID: 41868301
well - I THOUGHT it was close. But I can't find a close button as in the good old days....
0
 
LVL 58
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:João serras-pereira
ID: 41868404
these ideas made to confuse me....
I am closing now!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

688 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