winforms - C# WebBrowser object not loading Uri -


i believe i've researched here , elsewhere enough justify posting new question. situation similar not identical others' reported problems.

as proof of concept building app hits google streetview , staticmaps api's , displays images of them in c# windows form (.net 3.5 time being). form has webbrowser object, 4 textboxes (street, city, state, zip) address input , "go" button.

here's code (and other reputable posts/sites, should need):

using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms;  namespace googlemapstest {   public partial class form1 : form   {     public form1()     {       initializecomponent();     }      private void button1_click(object sender, eventargs e)     {       webstreetview = new webbrowser();       uri urlstring = new uri("https://maps.googleapis.com/maps/api/streetview?size=300x300&location=" +          txtstreet.text.replace(" ", "+") + "+" +          txtcity.text.replace(" ", "+") + "+" +          txtstate.text.replace(" ", "+") + "+" +          txtzip.text.replace(" ", "+"));       webstreetview.navigate(urlstring);     }   } } 

unfortunately form looks it's going through motions when "go" button clicked (i can see hourglass instant) webbrowser object remains blank.

here have done try test:

  1. plugged test url url property of object in design mode - form loads image
  2. pulled uri address out of app in debug , tested in browser - works fine
  3. per advice found similar problems, tried adding in call webbrowser.refresh() - no dice
  4. please note line "webstreetview = new webbrowser();" put in troubleshooting attempt per other comment.

it's simple i'm overlooking. if can point me in right direction , find i'm missing appreciated.

ok, figured out. apparently default margins (7,7,7,7) webbrowser object bare minimum (i had set them 0 in attempt show clean image no border).

for attempted answer question me in earnest, thank kindly.

for person downvoted question: go fish.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -