embed WebBrowser in WinForm  
Author Message
Eric Chow





PostPosted: Visual C# General, embed WebBrowser in WinForm Top

Hello,

I embed a WebBrowser in the web form, and show a page in it.

If the page is a Frame based page. It is possible to force the WebBrowser to show a specific frame.

Furthermore, how can I save the frame content into JPG

For example, the page has 3 frames (LEFT, CENTER, and RIGHT), I just want to show the LEFT and CENTER frame in the WebBrowser, and I want to save the CENTER into JPG. Is it possible to do this

Eric



Visual C#6  
 
 
ahmedilyas





PostPosted: Visual C# General, embed WebBrowser in WinForm Top

no this is not possible. you would have to do this some other way. The webbrowser control only loads documents/navigates to sites - thats its functionality.

you could try using the Document.Forms[index].ScrollIntoView(true); method, however not sure if the frames of the page will be indexed as forms.

Even better perhaps, use the Document.Window.Frames[index].Focus() and see if this will focus to the frame you are after



 
 
Eric Chow





PostPosted: Visual C# General, embed WebBrowser in WinForm Top

There is a web map site, I want to use it to find a location and save the map image into file. Would you please to teach me how can I do that or give me some example

Web site: http://www.gis.gov.mo/website/emacau/macao1.htm

search procedures:

- after load completely, click on the "Building Location" in the left frame.

- enter "Pou" in the "Your Keyword" text field

- Click "Go" and you will have a search result window.

- Click on the first result, you will get the map.

My question is that how can I save the map image (PNG) into file

Best regards,