TWebBrowser: Determine when a page with Frames is completed
TWebBrowser: Determine when a page with Frames is completed
6 comments. Current rating:
(3 votes). Leave comments and/ or rate it.
Question:
If I load a web page with TWebBrowser that contains frames then the OnDocumentComplete() is hit for each frame. How can I recognize that the page is completely loaded (no more frames missing)?
Answer:
Indeed, in case of multiple frames, OnDocumentComplete gets fired
multiple times. Not every frame fires this event, but each frame that
fires a DownloadBegin event will fire a corresponding DocumentComplete
event.
How can the 'real completion' be recognized?
The OnDocumentComplete event sends parameter pDisp: IDispatch,
which is the IDispatch of the frame (shdocvw) for which
DocumentComplete is fired. The top-level frame fires the
DocumentComplete in the end.
So, to check if a page is done downloading, you need to check if pDisp is same as the IDispatch of the WebBrowser control.
That's what the code below demonstrates.
![]() |
![]() |
|
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; |
||
![]() |
![]() |
You don't like the formatting? Check out SourceCoder then!
TWebBrowser: Determine when a page with Frames is completed的更多相关文章
- Understanding page frames and pages
Memory in Linux is organized in the form of pages (typically 4 KB in size). Contiguous linear addres ...
- System and method to prioritize large memory page allocation in virtualized systems
The prioritization of large memory page mapping is a function of the access bits in the L1 page tabl ...
- Linear to physical address translation with support for page attributes
Embodiments of the invention are generally directed to systems, methods, and apparatuses for linear ...
- Window Relationships and Frames
If a page contains frames, each frame has its own window object and is stored in the frames collecti ...
- Operating system management of address-translation-related data structures and hardware lookasides
An approach is provided in a hypervised computer system where a page table request is at an operatin ...
- METHODS OF AND APPARATUS FOR USING TEXTURES IN GRAPHICS PROCESSING SYSTEMS
BACKGROUND The technology described herein relates to methods of and apparatus for using and handlin ...
- Different Approaches for MVCC
https://www.enterprisedb.com/well-known-databases-use-different-approaches-mvcc Well-known Databases ...
- 打印datagridview内容 实现横向纵向分页(转)
网上找了很多打印的,只发现这个比较好,实现了横向纵向分页. 代码如下: using System;using System.Collections.Generic;using System.Text; ...
- Lockless Ring Buffer Design
https://www.kernel.org/doc/Documentation/trace/ring-buffer-design.txt Lockless Ring Buffer Design == ...
随机推荐
- 【BZOJ】2301: [HAOI2011]Problem b(莫比乌斯+分块)
http://www.lydsy.com/JudgeOnline/problem.php?id=2301 和这题不是差不多的嘛--[BZOJ]1101: [POI2007]Zap(莫比乌斯+分块) 唯 ...
- 【noip模拟题】迎接仪式(dp+特殊的技巧)
好神的一题... 这是一道DP题,本题的难点在于状态的确定,由于调整是任意的,很难划分状态,我们略微修改一下调整的形式:把一次’j’和’z’交换看做两次变换:’j’->’z’;’z’->’ ...
- mysql插入多行数据
表结构如图:
- easyui上传文件
效果图: 代码: <form id="importFileForm" method="post" enctype="multipart/form ...
- iOS开发中多线程基础
耗时操作演练 代码演练 编写耗时方法 - (void)longOperation { for (int i = 0; i < 10000; ++i) { NSLog(@"%@ %d&q ...
- 如何用C语言读写文件
#include "stdio.h"#include <stdlib.h> main(){ FILE *fp1;//定义文件流指针,用于打开读取的文件 FILE *fp ...
- 【BZOJ3436】小K的农场 差分约束
[BZOJ3436]小K的农场 Description 背景 小K是个特么喜欢玩MC的孩纸... 描述 小K在MC里面建立很多很多的农场,总共n个,以至于他自己都忘记了每个农场中种植作物的具体数量了, ...
- LeetCode-Add and Search Word
Design a data structure that supports the following two operations: void addWord(word) bool search(w ...
- Servlet------>response
request代表了请求 response代表响应 HttpServletResponse setStatus();----->发送状态码 setHeader();---->发送响应头 g ...
- c#自定义控件做漂亮的列表
效果图如下: 完整项目代码下载: 点击下载



