Newsgroup: it.comp.lang.visual-basic
Titolo: Web Browser

Salve, vorrei sapere dove reperire l'help per il controllo webbrowser.
In particolare vorrei sapere qual č la proprietą da impostare per fargli
caricare un qualsiasi indirizzo

 caricare un qualsiasi indirizzo
in particolare:
Private Sub Command1_Click()
  WebBrowser1.Navigate "
www.yahoo.it
"
End Sub
In generale: cerca nell'MSDN "WebBrowser"
Tra l'altro:
'----------------------------------
Microsoft internet control (=webBrowser)
Using the WebBrowser Control from Visual Basic
The WebBrowser control supports properties, methods, and events that
allow developers to create a highly customized Web browser with the
WebBrowser object. Companies may want to use the WebBrowser control to
create a Web browsing application that restricts navigation to a local
intranet and company-approved public Web sites. To use the WebBrowser
object, simply add the "Microsoft Internet Controls" component to your
Visual Basic project and place the WebBrowser control on a Visual Basic
form. Accomplish this by selecting Components on the Project menu in
Visual Basic.
An application can also create and manipulate an instance of the
Internet Explorer application through Automation with the
InternetExplorer object. To use the InternetExplorer object in a Visual
Basic application, declare the object as indicated in the Application
property description.
The WebBrowser object does not support all the properties and methods
that are available to the InternetExplorer object. These additional
features are indicated in the Applies To list for each method and
property. Error codes are returned when these features are used with the
WebBrowser object. In Visual Basic, you can trap errors with the "On
Error Resume Next" statement and by accessing the Err object's
associated properties, such as Err.Number and Err.Description.
Retrieving Information About the WebBrowser Control
Many properties can be used to retrieve information about the WebBrowser
control.
The LocationName and LocationURL properties can be used to retrieve
information about the location that is currently displayed. If the
location is an HTML page on the World Wide Web, LocationName retrieves
the title of that page, and LocationURL retrieves the URL of that page.
If the location is a folder or file on the network or local computer,
LocationName and LocationURL both retrieve the Universal Naming
Convention (UNC) name or the full path of the folder or file.
The current status of the WebBrowser control can be obtained using the
Busy property. This BOOL value indicates whether the control is engaged
in a navigation or downloading operation. You should check the value of
this property before issuing the Stop method to cancel navigation or
downloading operations.
Customizing the User Interface
The WebBrowser control supports properties and associated events to
manipulate various
user interface elements of an Internet Explorer application or a custom
browser.
The size and position of the window used by the WebBrowser control can
be read or set with the Height, Left, Top,
and Width properties. Other user interface elements are enabled with
individual properties such as MenuBar, FullScreen, StatusBar, and
ToolBar. The associated OnMenuBar, OnFullScreen, OnStatusBar, and
OnToolBar events are triggered when the property value changes. These
events return a BOOL value to indicate the new state of the property and
to provide a mechanism to respond to user actions in the
InternetExplorer object.
When using OLE Automation with the InternetExplorer object, the
application window can be shown or hidden by setting
the value of the Visible property. When changed, the associated
OnVisible event returns the current BOOL value of the property. You may
also want to retrieve information about the Internet Explorer
application itself. To do so, use the Name property to get the Internet
Explorer application name, and use the Path and FullName properties to
get the Internet Explorer application's path and file name.
Navigating with the WebBrowser Control
Use the Navigate or Navigate2 method to browse HTML pages on the World
Wide Web or any file or folder on the network or
local computer. In addition to the required URL argument passed to the
Navigate or Navigate2 method, you can optionally
include flags to specify more detailed information about the navigation,
such as the HTML frame name target and the
http headers sent to the server. You can browse through the sites
maintained in the browser's history list during each browser
session by using the GoBack and GoForward methods. If you wish to go
directly to the Internet Explorer home or search pages that have been
specified in the Internet Explorer Options dialog box, use the GoHome or
GoSearch method. To display the most current version of a page the
browser is viewing, use the Refresh or Refresh2 method. When using OLE
Automation, call the Quit method to close the instance of the Internet
Explorer application.
The WebBrowser control fires a number of different events to notify an
application of user—and browser—generated activity. When the browser is
about to navigate to a
new location, it triggers a BeforeNavigate2 event that specifies the URL
or path of the new location and any other data that
will be transmitted to the Internet server through the http transaction.
The data can include the http header, http post data, and the URL of the
referrer.
The BeforeNavigate2 event also includes a flag that can be set to cancel
the pending navigation request. This event can be useful for checking
the requested URL against a database of unauthorized World Wide Web
sites or local and network folders, and for canceling the navigation
request. The WebBrowser control fires the NavigateComplete2 event after
it has navigated to a new location. This event includes the same
information as BeforeNavigate2, except NavigateComplete2 does not
include the cancel flag.
Whenever the browser is about to begin a download operation, it triggers
the DownloadBegin event.
The control also generates a number of ProgressChange events as the
operation progresses, and then it triggers the DownloadComplete event
after completing the operation. Applications typically use these three
events to indicate the progress of the download operation, often by
displaying a progress bar. An application would show the progress bar in
response to DownloadBegin, update the progress bar in response to
ProgressChange, and hide the progress bar in response to
DownloadComplete.
When an application calls the Navigate or Navigate2 method with the
navOpenInNewWindow flag, the NewWindow2 event occurs before the new
browser window is created. This event allows the application to create
the new browser window or have a new instance of the Internet Explorer
application created. Once the new window is created, an accompanying
BeforeNavigate2 event occurs.
Note  The events discussed in the preceding section that apply to the
InternetExplorer object are supported in Visual Basic version 5.0 and
later.
'----------------------------------
-- 
Posted via Mailgate.ORG Server - 
http://www.Mailgate.ORG