Article View: pl.comp.lang.delphi
Article #126602Jeszcze raz WebBrowser (czytajcie tylko początek)
From: RaNo
Date: Tue, 09 Oct 2001 13:04
Date: Tue, 09 Oct 2001 13:04
119 lines
4461 bytes
4461 bytes
W procedurze zdarzeniowej onBeforeNavigate mam parametr pDisp. W helpie z MSDN (którego zamieszczam na końcu mojego listu) znajduję: <cytat> When reissuing a navigation for the WebBrowser object, the Stop method must first be executed for pDisp. </cytatu> Pytanie: Jak wykonać "Stop dla pDisp"? P.S. Ten TWebBrowser to chyba najciemniejsza magia, z jaką można się spotkać przy pracy programistycznej: ja sam próbuję go rozgryźć od dłuższego czasu, trzeba przyznać, że na Grupie prawie nikt nic o nim nie wie, nie ma do niego FAQ'w, ani stron jakiś "hobbystów", wreszcie pomoc na MSDN'ie jest tylko po angielsku, niekompletna i powolna i nie-dla-Delphi. Podsumowując: KOSZMAR! P.S. 2 Oto MSDN - WebBrowser - onBeforeNavigate: <cytat> BeforeNavigate2 Event Internet Development Index Fires before navigation occurs in the given object (on either a window or frameset element). Syntax Private Sub object_BeforeNavigate2( _ ByVal pDisp As Object, _ ByRef url As Variant, _ ByRef Flags As Variant, _ ByRef TargetFrameName As Variant, _ ByRef PostData As Variant, _ ByRef Headers As Variant, _ ByRef Cancel As Boolean) Parameters object Object expression that resolves to the objects in the Applies To list. pDisp Object that evaluates to the top-level or frame WebBrowser object corresponding to the navigation. url String expression that evaluates to the URL to which the browser is navigating. Flags TargetFrameName String expression that evaluates to the name of the frame in which the resource will be displayed, or Null if no named frame is targeted for the resource. PostData Data to send to the server if the HTTP POST transaction is being used. Headers Value that specifies the additional HTTP headers to send to the server (HTTP URLs only). The headers can specify such things as the action required of the server, the type of data being passed to the server, or a status code. Cancel Boolean value that the container can set to True to cancel the navigation operation, or to False to allow it to proceed. Remarks The BeforeNavigate2 event replaces the BeforeNavigate and FrameBeforeNavigate events, which should no longer be used. The pDisp parameter that specifies the corresponding WebBrowser object clearly identifies where the navigation is to occur. MicrosoftR Internet Explorer 3.0 required the FrameBeforeNavigate and a target frame name to identify the target of navigation. However, this solution was potentially ambiguous as frame names are not unique. Note Internet Explorer 4.0 and later continue to fire the BeforeNavigate and FrameBeforeNavigate events for compatibility with Internet Explorer 3.0. The pDisp parameter specifies the WebBrowser object of the top-level frame corresponding to the navigation. Navigating to a different URL could happen as a result of external automation, internal automation from a script, or the user clicking a link or typing in the address bar. The processing of this navigation can be modified by setting the Cancel parameter to True and either ignoring or reissuing a modified navigation method to the WebBrowser object. When reissuing a navigation for the WebBrowser object, the Stop method must first be executed for pDisp. This prevents the display of a web page that declares a cancelled navigation from appearing while the new navigation is being processed. </cytatu> -- Radosław Nowak www.RaNo.cad.pl
Technical Details
Message-ID:
<9pusnm$h94$1@news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.astercity.net!newsfeed.tpinternet.pl!news.tpi.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.astercity.net!newsfeed.tpinternet.pl!news.tpi.pl!not-for-mail From: "RaNo" <ranologo@poczta.fm> Newsgroups: pl.comp.lang.delphi Subject: Jeszcze raz WebBrowser (czytajcie tylko początek) Date: Tue, 9 Oct 2001 15:04:00 +0200 Organization: tp.internet - http://www.tpi.pl Lines: 121 Message-ID: <9pusnm$h94$1@news.tpi.pl> NNTP-Posting-Host: pa36.krakow.cvx.ppp.tpnet.pl X-Trace: news.tpi.pl 1002632758 17700 213.76.36.36 (9 Oct 2001 13:05:58 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: 9 Oct 2001 13:05:58 GMT X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit