Цитата | 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.
|
Код | Private Sub WebBrowser_BeforeNavigate2(ByVal URL As String, _ ByVal Flags As Long, _ ByVal TargetFrameName As String, _ PostData As Variant, _ ByVal Headers As String, _ Cancel As Boolean)
|
|