【TWebBrowser Or EmbeddedWB 完全技巧收集】 (300分)

to 钞票:
老大,如何加入yahoo的新闻组?
 
http://www.cn99.com
 
看看这个吧。
http://members.shaw.ca/iedelphi/
 
我改过几个iedelphi的组件,贴出来给大家看看
 
好啊,支持!
 
《程序员》2002年 合订本上期第189页有一文《完全掌握Tcppwebbrowser控件》
专门讲webbrowser的用法, 是有关c++ builder的其配套光盘中还有一个MDI方式实现的
IE程序完全源代码, 它具有类似腾讯的浏览器的功能
该文介绍很详细, 对delphi程序也有很大的帮助
 
再胡乱贴点文档:
Borland从shddocvw.dll中IE提供的WebBrowser控件,现有一些常见的多文档方式的浏览器(比如:飓风浏览器、腾迅浏览器等)等使用IE提WebBrowser控件。在BCB中导入的IE浏览器的名字为TcppWebBroswer。利用TcppWebBroswer可以实现IE的各项主要功能。TcppWebBrowser的主要用法可以参见BCB中的帮助,其中写得很详细。
座席增加的类IE的浏览器功能如下:
3.6.1 文件功能:
实现与IE相同的打开, 另存为, 页面设置,打印, 属性,脱机工作, 关闭, 全部关闭等功能。实现方法如下:
3.6.1.1 打开:
使用时经过两次封装,实际TCppWebBrowser的Navigate2方法
3.6.1.2 另存为:
使用时经过一次封装,调用TfrmWeb->DOC_SaveAs(), 实际使用的方法是TcppWebBroswer的ExecWB(Shdocvw_tlb::OLECMDID_SAVEAS,&vaIn);
3.6.1.3页面设置:
使用时经过一次封装,实际使用TcppWebBroswer的ExecWB(Shdocvw_tlb::OLECMDID_PAGESETUP)方法。
3.6.1.4打印:
使用时经过一次封装,实际使用TcppWebBroswer的ExecWBEx(IDM_PRINT,NULL,NULL,nCmdExecOpt)方法;
3.6.1.5属性:
使用时经过一次封装,实际使用TcppWebBroswer的ExecWB(Shdocvw_tlb::OLECMDID_PROPERTIES)方法
3.6.1.6脱机工作:
通过设置TcppWebBrowser的Offline的属性来实现.
3.61.7 关闭和全部关闭: 使用MDI子窗体的关闭方法

3.6.2编辑功能:
实现了与IE相同的剪切, 复制, 粘贴, 全选, 查找等功能。实现方法如下:

3.6.2.1 剪切功能
调用的方法是: ExecWB(Shdocvw_tlb::OLECMDID_CUT);
3.6.2.2 复制功能
调用的方法是: ExecWB(Shdocvw_tlb::OLECMDID_COPY);
3.6.2.3 粘贴功能
调用的方法是: ExecWB(Shdocvw_tlb::OLECMDID_PASTE);
3.6.2.4 全选功能
调用的方法是: ExecWB(Shdocvw_tlb::OLECMDID_SELECTALL);
3.6.2.4 查找功能
调用的方法是: ExecWBEx(IDM_FIND);

3.6.3 查看功能:
具有与IE相同的后退, 前进, 主页,搜索, 停止,刷新,网页文字大小设置, 查看源文件等功能。
3.6.3.1 后退功能:
调用的方法是:TcppWebBrowser的GoBack方法
3.6.3.2 前进功能
调用的方法是:TcppWebBrowser的GoForward方法
3.6.3.3 主页功能
调用的方法是:TcppWebBrowser的GoHome方法
从HKEY_CURRENT_USER//Software//Microsoft//Internet//Explorer//Main注册表项中读取注册键Start Page的值作为主页内容。
3.6.3.4 搜索功能
调用的方法是:TcppWebBrowser的GoSearch方法
3.6.3.5 停止功能
调用的方法是:TcppWebBrowser的Stop方法
3.6.3.6 刷新功能
调用的方法是:TcppWebBrowser的Refresh方法
3.6.3.7 设置网页文字大小功能
A) 读取网页文字大小:
在激活查看菜单时,读取网页文字大小。
TFrmWeb *frmWebBrowser = GetActiveBrowserWindow();
if(frmWebBrowser)
{
// 字体大小菜单
int FontSize = frmWebBrowser->DOC_FontSize;
if(FontSize >= 0 &amp;&amp; FontSize <= 4)
{
mFontSize->Items[4 - FontSize]->Checked = true;
}
}
B)设置网页文字大小:
TFrmWeb *frmWebBrowser = GetActiveBrowserWindow();
if(frmWebBrowser)
{
TMenuItem *Item = static_cast<TMenuItem*> (Sender);
frmWebBrowser->DOC_FontSize = Item->Tag;
Item->Checked = true;
}
3.6.3.8 查看源文件功能
调用的方法是:TcppWebBrowser的ExecWBEx(IDM_VIEWSOURCE);

3.6.4收藏夹:
提供与IE相同的收藏夹功能, 可以增加和整理收藏夹。
3.6.4.1添加到收藏夹:
调用方法TcppWebBrowser的ExecWBEx(IDM_ADDFAVORITES, NULL, NULL, NULL)方法来实现,添加到收藏夹完毕后要重新显示收藏夹。
3.6.4.2整收藏夹:
利用shdocvw.dll的DoOrganizeFavDlg来实现此功能:
typedef int __stdcall (DOOOGANIZEFAVDLG)(HANDLE, const char *);
try
{
HANDLE hShDocvw = LoadLibrary("shdocvw.dll");
if(hShDocvw)
{
DOOOGANIZEFAVDLG *pDoOrganizeFavDlg = (DOOOGANIZEFAVDLG *)
GetProcAddress(hShDocvw,
"DoOrganizeFavDlg");
if(pDoOrganizeFavDlg)
{
pDoOrganizeFavDlg(Handle, NULL);
InitFavoritesMenu(); //整理完毕后进行重新列出收藏夹菜单
}
FreeLibrary(hShDocvw);
}
}
catch(...)
{
}
3.6.4.3 读取IE收藏夹:
利用以下两个函数SHGetSpecialFolderLocation和SHGetPathFromIDList来得到收藏夹的路径,再循环读取取该路径的所有目录和文件即可。

3.6.5工具功能:
提供Internet选项设置功能, 在工具菜单中提供座席的功能扩展方式, 其它程序或者网页可以使用此接口嵌入到座席程序作为扩展功能。
3.6.5.1 Internet选项:
调用Inetcpl.cpl即可。目前有三种实现方法,具体实现均放在源代码。现采用模态对话框方式。
3.6.5.1 座席扩展功能:
采用IE的扩展办法,从IE配置中读取工具程序和网页设置, 动态加载到工具菜单中,只要HKEY_LOCAL_MACHINE//SOFTWARE//Microsoft//Internet Explorer//Extension中满足扩展配置条件且存在MenuText的工具均加载到工具菜单。
并将internet选项菜单动态创建在最后, 通过与StringList2的一一对应关系进行菜单动作的处理。
如果exec字符串使用http,ftp协议或者包含".htm"字符串则直接调用网页, 其它则用WinExec来直接调用运行。
第三方程序的功能扩展可以使用此方法。
 
我也来凑凑热闹,提供点好料。

Q: wb: With the introduction of IE 5.5, the DHTMLEdit component has
been superseded by the [...] Editor
A: MSHTML

Q: wb: Dhtmled.ocx [is / is not] included in IE 6
A: is not (it was last seen in IE 5.5)

Q: wb: The parsing and rendering of HTML documents in the WebBrowser
control is handled by the [...] component of Microsoft&amp;reg; Internet
Explorer 4.0 and later
A: MSHTML

Q: wb: The Internet Explorer is a wrapper program for two browser
ActiveX controls, Shdocvw.dll and [...].dll
A: Mshtml

Q: wb: The WebBrowser control acts as a container for the [...]
component and implements navigation, hyperlinking, history lists,
favorites, and security
A: MSHTML

Q: wb: MSHTML command identifiers: IDM_[...] toggles the current
selection between bold and nonbold
A: BOLD

Q: wb: Making a document editable:
Q: document.body.setAttribute('contentEditable',[...],0);
A: 'true'

Q: wb: IDM_BACKCOLOR sets or retrieves the [...] of the current
selection
A: background color

Q: wb: IHTMLElement.tagName retrieves [...] of the object
A: the name of the tag

Q: wb: IHTMLEventObj.[...] sets or retrieves the Unicode key code
associated with the key that caused the event
A: keyCode

Q: wb: IHTMLDocument2.[...] retrieves the object that has the focus
when the parent document has focus
A: activeElement

Q: wb: MSHTML command identifiers: [...]_FONT opens a font dialog box
A: IDM

Q: wb: TWebBrowser.[...] goes to the home page
A: GoHome

Q: wb: Which DLL implements favorites: WebBrowser or MSHTML?
A: WebBrowser

Q: wb: IHTMLElement.click simulates a click by causing the [...]
event to fire
A: onclick

Q: wb: You can make an individual element editable by using the
element's [...] property
A: contentEditable

Q: wb: IHTMLWindow2.[...] causes the element to lose focus
A: blur (and fires the onblur event)

Q: wb: Document.body specifies the beginning and end of the [...]
A: document body

Q: wb: IHTMLEventObj2.[...] sets or retrieves the state of the ALT
key
A: altKey

Q: wb: Getting the clicked hyperlink:
Q: if Element.[...]='A' then begin
Q: Hyperlink:=Element.getAttribute('href',0);
A: tagName

Q: wb: An Olevariant consist of [...] pieces of information: first
the type of value and then the value itself.
A: two

Q: wb: IDM_PASTE overwrites the contents of the clipboard on [...]
A: the current selection

Q: wb: Making a document editable: TWebBrowser.
[...].body.setAttribute('contentEditable','true',0);
A: document

Q: wb: Assigning HTML to a document:
Q: if document.body<>nil then
Q: document.body.[...]:=HTML;
A: innerHTML

Q: wb: Is security implemented by TWebBrowser or MSHTML?
A: WebBrowser

Q: wb: IHTMLEventObj.keyCode Property is used with the [...], and
onkeypress events
A: onkeydown and onkeyup

Q: wb: WebBrowser1.Document.Body.[...] := '<b>Hello World!</b>';
A: InnerHTML

Q: wb: Document.[...].clear clears the contents of the selection
A: selection

Q: wb: Pasting HTML to TWebBrowser:
Q:
Q: TxtRange:=TWebBrowser.Document.[...].CreateRange as IHtmlTxtRange;
Q: TxtRange.PasteHtml('<b>Hello</b>');
A: Selection

Q: wb: Assigning HTML to a document:
Q:
Q: if Document.[...]<>nil then
Q: Document.[...].innerHTML:=HTML;
A: body

Q: wb: [...] methods: moveToElementText(element) moves the text
range's start and end points to enclose a given HTML element
A: TextRange

Q: wb: TextRange.queryCommandEnabled indicates whether a specified
command can be successfully executed using [...]
A: execCommand

Q: wb: IHTMLDocument2.images retrieves a pointer to the
IHTMLElementCollection interface of the collection of all the [...]
in an HTML document
A: images

Q: wb: IHTMLWindow2.blur causes the element to [...] and fires the
onblur event
A: lose focus

Q: wb: TextRange.parentElement retrieves the parent element for the
given [...]
A: text range

Q: wb: Pasting HTML to TWebBrowser:
Q: TxtRange:=TWebBrowser.Document.Selection.CreateRange as
IHtmlTxtRange;
Q: TxtRange.PasteHtml([...]);
A: html string (e.g. '<b>Hello</b>')

Q: wb: IHTMLEventObj2.[...] sets or retrieves the mouse button
pressed by the user
A: button

Q: wb: TextRange.[...] causes the object to scroll into view
A: scrollIntoView

Q: wb: To fire an event, the server calls the respective method on
the client event sink. These interfaces are called [...] interfaces
A: outgoing (i.e. reversely called by the server on the client)

Q: wb: Once an HTML page is loaded, you can access the HTML elements
through the [...]
A: DHTML (DHTML Object Model)

Q: wb: TWebBrowser.[...] goes forward on the history list
A: GoForward

Q: wb: Getting the clicked hyperlink:
Q: if Element.tagName=[...] then begin
Q: Hyperlink:=Element.getAttribute('href',0);
A: 'A'

Q: wb: IHTMLDocument2.[...] retrieves a pointer to the
IHTMLElementCollection interface of the zero-based collection of all
the images in an HTML document
A: images

Q: wb: TextRange.collapse moves the insertion point to the [...] of
the current range
A: beginning or end

Q: wb: There is only one scenario where it is recommended that an
application host Mshtml.dll rather than the WebBrowser control: [...]
A: parsing HTML

Q: wb: IHTMLWindow2.name sets or retrieves a value that indicates
the [...] name
A: window

Q: wb: [...].keyCode sets or retrieves the Unicode key code
associated with the key that caused the event
A: IHTMLEventObj

Q: wb: WebBrowser1.[...] begins the search
A: GoSearch

Q: wb: An Olevariant consist of two pieces of information: first the
type of value and then [...]
A: the value itself

Q: wb: TextRange.[...] indicates whether a specified command can be
successfully executed using execCommand
A: queryCommandEnabled

Q: wb: IHTMLEventObj.offsetX retrieves the x-coordinate of the mouse
pointer's relative to the [...]
A: firing object

Q: wb: Making a document editable: TWebBrowser.document.body.[...]
('contentEditable','true',0);
A: setAttribute

Q: wb: TextRange.[...] moves the insertion point to the beginning or
end of the current range
A: collapse

Q: wb: IDM_OUTDENT decreases by [...](#) increment the indentation
of the format block
A: one

Q: wb: An [...](OLE type) consist of two pieces of information:
first the type of value and then the value itself
A: OleVariant

Q: wb: Document.selection.clear [...]
A: clears the contents of the selection

Q: wb: The [...] clipboard format allows a fragment of raw HTML text
and its context to be stored on the clipboard as ASCII
A: CF_HTML

Q: wb: IHTMLEventObj::[...] retrieves the x-coordinate of the mouse
pointer's position relative to the object firing the event
A: offsetX

Q: wb: TextRange.inRange returns a value indicating whether one
range is contained within [...]
A: another

Q: wb: [...]_OUTDENT decreases by one increment the indentation of
the format block in which the current selection is located
A: IDM

Q: wb: IDM_FONT command [...](does what?)
A: Opens a font dialog box (to modify fonts)

Q: wb: Should one use Shdocvw.dll or Mshtml.dll? Mshtml.dll does not
support [...] hyperlinking
A: in-place (clicking a hyperlink would run a new instance of the
browser)

Q: wb: IDM_[...] overwrites the contents of the clipboard on the
current selection
A: PASTE

Q: wb: With the introduction of IE 5.5, the DHTMLEdit component has
been superseded by the MSHTML [...]
A: dll/editor

Q: wb: TextRange.htmlText retrieves the HTML source as a valid [...]
fragment
A: HTML

Q: wb: IDM_FONT opens a font dialog box to enable the user to change
the text color, font, and font size of [...]
A: the current selection

Q: wb: IHTMLEventObj.type retrieves the [...]
A: event name

Q: wb: Getting the clicked hyperlink:
Q:
Q: if Element.tagName='A' then begin
Q: Hyperlink:=Element.[...]('href',0);
A: getAttribute

Q: wb: IHTMLEventObj.[...] retrieves the event name
A: type (in Delphi: type_)

Q: wb: The following steps are required to receive events from an
outgoing interface:
Q: 1. Implement the event sink
Q: 2. Find the appropriate connection point
Q: 3. Advise the [...] that you want to receive events
A: connection point

Q: wb: IDM_OUTDENT [...] by one increment the indentation of the
format block in which the current selection is located
A: decreases

Q: wb: The DHTML editing component is just a wrapper for the [...].
It was developed back in the days of Internet Explorer 4.0
A: MSHTML (editor)

Q: wb: TextRange.htmlText retrieves the [source/text]
A: (HTML) source

Q: wb: Document.selection.createRangeCollection creates a TextRange
object collection from the [...]
A: current selection

Q: wb: IHTMLEventObj.[...] sets or retrieves the return value from
the event
A: returnValue

Q: wb: Making a document editable: TWebBrowser.document.
[...].setAttribute('contentEditable','true',0);
A: body

Q: wb: Pasting HTML to TWebBrowser:
Q: TxtRange:=Document.Selection.[...] as IHtmlTxtRange;
Q: TxtRange.PasteHtml('<b>hello</b>');
A: CreateRange

Q: wb: Making a document editable:
TWebBrowser.document.body.setAttribute([...],'true',0);
A: 'contentEditable'

Q: wb: IHTMLEventObj4 Interface extends the IHTMLEventObj ,
IHTMLEventObj2 , and [...] interfaces
A: IHTMLEventObj3

Q: wb: IHTMLEventObj2.button sets or retrieves [...]
A: mouse button (pressed by the user)

Q: wb: Pasting HTML to TWebBrowser:
Q: TxtRange:=Document.Selection.CreateRange as IHtmlTxtRange;
Q: TxtRange.[...]('<b>love</b>');
A: PasteHtml

Q: wb: TextRange.collapse moves the insertion point to the beginning
or end of the [...]
A: current range

Q: wb: Variants [can/cannot] hold interfaces
A: can

Q: wb: The CF_HTML clipboard format allows HTML text to be stored on
the clipboard as [...](format)
A: text/ASCII

Q: wb: What can be retrieved here upon a click:
Q: if Element.tagName='A' then
Q: [...]:=Element.getAttribute('href',0);
A: hyperlink

Q: wb: IHTMLElement.isTextEdit retrieves whether a [...] object can
be created using the object
A: TextRange

Q: wb: TextRange.queryCommandEnabled indicates whether a command can
be executed with execCommand, given the current state of the [...]
A: document

Q: wb: The HTMLElementEvents2 interface is an [...] sink interface
that enables an application to receive events for HTML elements
A: event

Q: wb: IHTMLDocument2.[...] sets or retrieves the foreground (text)
color of the document
A: fgColor

Q: wb: TextRange.htmlText retrieves the HTML source as a [...] HTML
fragment
A: valid

Q: wb: When an element is control-selected, clicking it allows the
user to edit it (unless it is a non-scoped element, like [...]
(examples))
A: image / horizontal line

Q: wb: VarType=[...]: the variant is Null
A: varNull

Q: wb: Web browser control architecture is recursive in framesets.
Each instance of a frame is another instance of shdocvw.dll hosting
[...].dll
A: mshtml

Q: wb: IHTMLEventObj.keyCode sets or retrieves the [...](class) key
code associated with the key
A: Unicode

Q: wb: To obtain an IHTMLEventObj2 or IHTMLEventObj3 interface
pointer, call QueryInteface on the IHTMLEventObj [...](entity)
A: interface

Q: wb: IHTMLDocument2.images retrieves a pointer to the [...]
ElementCollection interface of all the images in a document
A: IHTML

Q: wb: The WebBrowser control acts as a [...] for the MSHTML
component and implements navigation, hyperlinking, history lists,
favorites, and security
A: container

Q: wb: Pasting HTML:
Q: TxtRange:=Document.Selection.CreateRange as [...];
Q: TxtRange.PasteHtml('<b>Hello</b>');
A: IHtmlTxtRange

Q: wb: [...].selection.clear clears the contents of the selection
A: document

Q: wb: Variants can hold anything but structured types and pointers.
They can hold interfaces, whose methods and [...] can be accessed
through them
A: properties

Q: wb: Internet Explorer is a wrapper program for two ActiveX
controls, Shdocvw.dll (also called the [...] Control) and Mshtml.dll
A: WebBrowser

Q: wb: IDM_OUTDENT decreases by one the indentation of the format
block in which [...]
A: the current selection is located

Q: wb: Globally Unique [...] (GUID)
A: Identifier

Q: wb: [...].fgColor sets or retrieves the foreground (text) color
of the document
A: document (IHTMLDocument2)

Q: wb: IHTMLDocument2.activeElement retrieves the object that has
the focus when [...]
A: the parent document has focus

Q: wb: IDM_UNDERLINE toggles the current selection between [...]
A: underlined and not underlined

Q: wb: IOmHistory.forward loads the next URL from the [...] list
A: History

Q: wb: TextRange.[...] retrieves the parent element for the given
text range
A: parentElement

Q: wb: [...].type retrieves the event name: e.g. "mousedown"
A: IHTMLEventObj

Q: wb: IDM_[...] sets or retrieves the foreground (text) color of
the current selection
A: FORECOLOR

Q: wb: selection.createRange creates a TextRange object from the
current text selection, or a controlRange collection from a control
[...]
A: selection

Q: wb: selection.[...] creates a TextRange object from the current
text selection (or a controlRange collection from a control
selection)
A: createRange

Q: wb: TextRange.moveToElementText([...]) moves the text range's
start and end points to enclose an HTML element
A: element

Q: wb: TextRange.inRange(comparison) determines whether [...] is
within the current text range
A: comparison range

Q: wb: IHTMLElement.lang sets or retrieves [...]
A: the language (to use)

Q: wb: TextRange.[...](comparison) determines whether the comparison
range is within or equal to the current text range
A: inRange

Q: wb: IHTMLEventObj.offsetX retrieves the x-coordinate of the [...]
relative to the object firing the event
A: mouse pointer's position

Q: wb: Use [...] : Windows update to install Windows update control
via Internet Explorer
A: Tools

Q: wb: IHTMLElement.[...] retrieves whether a TextRange object can
be created using the object
A: isTextEdit

Q: wb: IDM_[...] toggles the current selection between underlined
and not underlined
A: IDM_UNDERLINE

Q: wb: IDM_FORECOLOR sets or retrieves the [...] of the current
selection
A: (foreground) text color

Q: wb: Load a string into the document object:
doc:=WebBrowser.Document; doc.Open; doc.Write(HTMLString); doc.[...];
A: Close

Q: wb: The navigator object: appName is the name of the browser
(such as "[...]")
A: Netscape

Q: wb: TextRange.inRange([...]) determines whether the range
indicated in the comparison parameter is within or equal to the
current text range
A: comparison

Q: wb:
Q: var Element:[...];
Q: begin
Q: element:=WebBrowser.Document.ActiveElement;
A: OleVariant/IHTMLElement

Q: wb: TextRange.inRange(comparison) determines whether the range
indicated in the comparison parameter is[...] the current text range
A: within or equal to

Q: wb: [...].inRange(comparison) determines whether the range
indicated in the comparison parameter is within or equal to the
current text range
A: TextRange

Q: wb: TextRange.[...] retrieves the HTML source as a valid HTML
fragment
A: htmlText

Q: wb:[...] methods: collapse moves the insertion point to the
beginning or end of the current range
A: TextRange

Q: wb: The navigator object: [...] keeps the name of the browser
(such as "Netscape")
A: appName

Q: wb: document.selection.empty cancels the current selection, sets
the selection type to [...], and sets the item property to null
A: none

Q: wb: TextRange.inRange(comparison) determines whether the range
indicated in the comparison parameter is within or equal to the [...]
A: current text range

Q: wb: The MSHTML component is an [...] (also known as a DocObject)
that provides support for parsing and rendering HTML
A: Active Document

Q: wb: IDM_UNDERLINE [...] the current selection between underlined
and not underlined
A: toggles

Q: wb: function VarType(const V: Variant): TVarType returns [...] if
the variant is Unassigned
A: varEmpty

Q: wb: IHTMLElement.[...] simulates a click by causing the onclick
event to fire
A: click

Q: wb: [...].forward loads the next URL from the History list
A: IOmHistory

Q: wb: The navigator object: appName is the name of the[...]
A: browser (such as "Netscape")

Q: wb: The[...] object: appName keeps the name of the browser (such
as "Netscape")
A: navigator

Q: wb: [...]_BLOCKFMT sets or retrieves the current block format tag
A: IDM

Q: wb: Getting the clicked hyperlink:
Q: if Element.tagName='A' then
Q: Hyperlink:=[...].getAttribute('href',0);
A: Element

Q: wb: Load a string into the document object:
Q: doc:=Browser.Document;
Q: doc.Open;
Q: doc.[...](HTMLString);
Q: doc.Close;
A: Write

Q: wb: IDM_FONTNAME sets or retrieves [...]
A: the font (for the current selection)

Q: wb: TextRange.FindText(string): to continue the search,
reposition the start point of the [...] to the end of the found text
(use the collapse method)
A: text range

Q: wb: IDM_BLOCKFMT sets or retrieves the current [...] format tag
A: block

Q: wb: Mshtml.dll is an Active Document that performs the HTML [...]
in Internet Explorer
A: parsing/rendering

Q: wb: TextRange.scrollIntoView causes the object to scroll into
view, aligning it either at the[...] of the window
A: top or bottom

Q: wb: IHTMLElement.style retrieves an inline style[...] for the tag
A: sheet

Q: wb: TextRange.[...](comparison) determines whether the range
indicated in the comparison parameter is equal to the current text
range
A: isEqual

Q: wb: The [...] control acts as a container for the MSHTML
component and implements navigation, hyperlinking, history lists,
favorites, and security
A: WebBrowser

Q: wb: Mshtml.dll performs the HTML parsing and rendering in [...]
(important application)
A: Internet Explorer

Q: wb: An Olevariant consist of two pieces of information: first the
[...] and the value
A: type (of value)

Q: wb: TextRange.moveToElementText(element) moves the text range's
start and end points to enclose [...]
A: the HTML element (the element variable)

Q: wb: TextRange.queryCommandEnabled indicates whether a specified
command [...] given the current state of the document
A: can be executed (using execCommand)

Q: wb: procedure SetCaretPosition(Value: TPoint); var vo:
OleVariant;InitialPos: Integer; begin InitialPos := -vo.move([...], -
9999999); vo.move(CharacterStr, InitialPos + Value); end;
A: 'character'

Q: wb: IDM_[...] opens a font dialog box to affect the current
selection
A: FONT

Q: wb: TextRange.findText(string); to continue the search,
reposition the start point of the text range to [...] of the found
text
A: the end (use the collapse method)

Q: wb: Selection.createRange creates a TextRange object from the
current text selection, or a controlRange collection from a[...]
selection
A: control

Q: wb: TextRange methods: findText(string). To continue the search,
reposition the start point of the text range to the end of[...]
A: the found text (use the collapse method)

Q: wb: IDM_INDENT increases the indent of the selected text by[...]
indentation increment
A: one

Q: wb: IHTMLEventObj.keyCode sets or retrieves the Unicode key code
associated with the key that [...]
A: caused the event

Q: wb: Selection.createRange creates a [...] object from the current
text selection, or a controlRange collection from a control selection
A: TextRange

Q: wb: function CanCopyCut: boolean;
Q: var Range: IHTMLTxtRange;
Q: begin
Q: Range := DomInterface.selection.createRange as IHTMLTxtRange;
Q: Result := (Range.Text <> [...]);
A: ''

Q: wb: Getting the clicked hyperlink:if Element.tagName='A' then
Hyperlink:=Element.getAttribute('href',[...]);
A: 0

Q: wb: Load a string into the document object:
doc:=Browser.Document; doc.[...]; doc.Write(HTMLString); doc.Close;
A: Open

Q: wb: IDM_[...] decreases by one increment the indentation of the
format block in which the current selection is located
A: OUTDENT

Q: wb: Shdocvw.dll vs. Mshtml.dll: Mshtml.dll does not support in-
place hyperlinking, so clicking a [...] would run a new instance of
the browser
A: hyperlink

Q: wb: TextRange.moveToElementText(element) moves the range to [...]
the HTML element
A: enclose

Q: wb: [...]_BOLD toggles the current selection between bold and
nonbold
A: IDM

Q: wb: Richly formatted documents, such as [...](examples), can be
opened and edited in place from within the WebBrowser control
A: Excel spreadsheets, Word documents, etc.

Q: wb: IDM_UNDERLINE toggles the current[...] between underlined and
not underlined
A: selection

Q: wb: TextRange.collapse[...] the insertion point to the beginning
or end of the current range
A: moves

Q: wb: IDM_OUTDENT decreases by one increment the[...] of the format
block
A: indentation

Q: wb: TextRange.[...] sets the endpoint of one range based on the
endpoint of another range
A: setEndPoint

Q: wb: IHTMLEventObj4 Interface extends the following interfaces:
[...]
A: IHTMLEventObj, IHTMLEventObj2, and IHTMLEventObj3

Q: wb: Saving the contents of the browser: (WebBrowser.[...] as
IPersistFile).Save('c:/hello.htm', True)
A: Document

Q: wb: TextRange.execCommand() method:[...] removes the A NAME= tags
from the text range
A: UnBookMark

Q: wb: IDM_[...] sets or retrieves the font for the current selection
A: FONTNAME

Q: wb: IHTMLDocument2.imagesretrieves a pointer to the
IHTMLElementCollection interface of all the images. The images are
in the [...](order)
A: the order of appearance (in the document)

Q: wb: IHTMLEventObj.[...] retrieves the x-coordinate of the mouse
pointer's position relative to the parent element
A: x

Q: wb: With the introduction of IE [...](version), the DHTMLEdit
component has been superseded by the MSHTML Editor
A: 5.5

Q: wb: Document.selection.empty [...] the current selection, sets
the selection type to none, and sets the item property to null
A: cancels

Q: wb: TextRange.setEndPoint sets the endpoint of one range based on
[...]
A: the endpoint of another range

Q: wb: IHTMLElement.title sets or retrieves [...] for the object
A: advisory information (a ToolTip)

Q: wb: TextRange.execCommand(): [...] copies the contents of the
clipboard into the text range
A: Paste

Q: wb: With CSS2, Cascading Style Sheets were described for both XML
and [...]
A: HTML

Q: wb: MSHTML was introduced in Internet Explorer [...](version)
A: 4.0

Q: wb: Saving the contents of the browser: (WebBrowser.Document as
IPersistFile).[...]('c:/hello.htm', True)
A: Save

Q: wb: Selection.createRange creates a controlRange[...] from a
control selection
A: collection

Q: wb: Is history list implemented by WebBrowser, MSHTML or neither?
A: WebBrowser

Q: wb: IDM_FONTSIZE sets or retrieves the font size for [...]
A: the current selection

Q: wb: TextRange.moveEnd(unit, [...])
A: count

Q: wb: TextRange.execCommand() method: UnBookMark removes the A [...]
= tags from the text range
A: NAME

Q: wb: IHTMLElement.all retrieves the collection of all the objects
in the HTML that are within the scope of [...]
A: the element

Q: wb: Selection.createRange creates a TextRange object from the
text selection, or a [...] collection from a control selection
A: controlRange

Q: wb: IDM_JUSTIFYCENTER[...] the format block in which the current
selection is located
A: centers

Q: wb: IDM_[...] creates a bookmark anchor or retrieves the name of
a bookmark anchor for the current selection
A: BOOKMARK

Q: wb: In TextRange.expand(unit), the unit textedit expands the
range to [...]
A: the entire original range

Q: wb: IHTMLEventObj.x retrieves the x-coordinate of the[...]
relative to the parent element
A: mouse pointer's position

Q: wb: TextRange.setEndPoint sets the endpoint of one[...] based on
the endpoint of another
A: range

Q: wb: IHTMLDocument2.selection can be an insertion point, or a[...]
block of text or other elements in the document upon which the user
or a script can carry out an action
A: highlighted

Q: wb: TextRange.[...] retrieves the distance between the top edge
of the rectangle that bounds the TextRange object and the top side
of the object that contains the TextRange
A: boundingTop

Q: wb: IHTMLEditDesigner interface is used to[...] the behavior of
the MSHTML Editor
A: customize

Q: wb: IDM_HYPERLINK inserts a hyperlink on the current selection,
or displays a[...] enabling the user to specify a URL
A: dialog box

Q: wb: IHTMLElement.[...] sets or retrieves the language in which
the current script is written
A: language

Q: wb: TextRange.[...]() method: UnBookMark removes the A NAME= tags
from the text range
A: execCommand

Q: wb: Calling IHTMLElement3.[...] on the body element is the same
thing as calling IHTMLDocument2.designMode on the document
A: contentEditable

Q: wb: The navigator object: appVersion keeps the browser's version
information (the release number, the[...] system, the International
version, etc.)
A: operating

Q: wb: IHTMLDocument2.[...] creates a style sheet for the document
A: createStyleSheet

Q: wb: TextRange.[...] moves the start and end positions of the text
range to the given point
A: moveToPoint

Q: wb: TextRange.[...]() method: OverWrite changes the input mode to
overwrite or insert
A: execCommand

Q: wb: IHTMLDocument2.[...] sets or retrieves a value that indicates
whether the document can be edited
A: designMode

Q: wb: IDM_UNORDERLIST toggles the current selection between an[...]
and a normal format block
A: ordered list

Q: wb: [...]2.name sets or retrieves a value that indicates the
window name
A: IHTMLWindow

Q: wb: IHTMLWindow3.print prints the document associated with [...]
A: the window

Q: wb: IHTMLEventObj.toElement retrieves a reference to the object
toward which the user is moving [...]
A: the mouse pointer

Q: wb: Document.selection.empty cancels the current selection, sets
the selection type to none, and sets the [...] property to null
A: item

Q: wb: IHTMLEventObj2.[...] sets or retrieves the x-coordinate of
the mouse pointer's position relative to the client area of the
window
A: clientX

Q: wb: IHTMLControlRange.scrollIntoView causes the object to scroll
into view, aligning it either at the[...] of the window
A: top or bottom

Q: wb: IHTMLElement2.createControlRange creates a [...] collection
of nontext
A: controlRange

Q: wb: IHTMLWindow2.[...] sets or retrieves a value that indicates
the window name
A: name

Q: wb: IHTMLElement.[...] sets or retrieves the HTML between the
start and end tags of the object
A: innerHTML

Q: wb: IHTMLLinkElement.readyState: the state is initially set to
[...]
A: uninitialized

Q: wb: IHTMLElement.innerHTML sets or retrieves the[...] between the
start and end tags of the object
A: HTML

Q: wb: IHTMLElement2.blur causes the element to lose focus and fires
the[...] event
A: onblur

Q: wb: IHTMLLinkElement.readyState: the state is initially set to
uninitialized, and then to [...]
A: loading

Q: wb: IHTMLElement2.[...] indicates whether the object can contain
children
A: canHaveChildren

Q: wb: IHTMLLinkElement.readyState: when data loading is complete,
the state of the link object passes through the loaded and
interactive states to reach the[...] state
A: complete

Q: wb: TextRange.boundingLeft retrieves the distance between the
left edge of the rectangle that[...] the TextRange object and the
left side of the object that contains the TextRange
A: bounds

Q: wb: IHTMLLinkElement.[...]: the state is initially set to
uninitialized, and then to loading, then loaded, interactive and
complete
A: readyState

Q: wb: TextRange.[...](string) moves to the text range that was
created using the getBookmark() method and stored in the string
variable
A: moveToBookmark

Q: wb: IHTMLWindow2.navigate loads the specified URL to [...]
A: the current window

Q: wb: Outlook[...] was built with the WebBrowser control
A: Today

Q: wb: TextRange.execCommand() method: UnBookMark[...] the A NAME=
tags from the text range
A: removes

Q: wb: IHTMLWindow2.[...] retrieves an interface pointer to a
navigator object that represents the browser
A: navigator

Q: wb: IHTMLWindow2.offscreenBuffering sets or retrieves whether
objects are drawn[...] before being made visible to the user
A: offscreen

Q: wb: When an element is [...]-active, the user can edit its
contents, unless it is a non-scoped element (e.g. image, horizontal
line, etc.)
A: UI

Q: wb: [...].boundingHeight retrieves the height of the rectangle
that bounds the TextRange object
A: TextRange

Q: wb: IHTMLScriptElement.[...] sets or retrieves the MIME type for
the associated scripting engine
A: type

Q: wb: IDM_REMOVEFORMAT removes the formatting[...] from the current
selection
A: tags

Q: wb: IDM_BOOKMARK creates a bookmark anchor or retrieves the[...]
of a bookmark anchor for the current selection
A: name

Q: wb: IHTML[...]2.nameProp retrieves the title of the document file
A: Document

Q: wb: IHTMLDocument2.execCommandShowHelp displays help information
for the given [...]
A: command identifier

Q: wb: IHTMLScriptElement.type sets or retrieves the[...] type for
the associated scripting engine
A: MIME

Q: wb: Setting the contentEditable attribute on the body element
makes the entire document editable, just like putting the document in
[...] mode
A: design

Q: wb: IHTMLDocument2.fileCreatedDate retrieves the date the file
was [...]
A: created

Q: wb: IHTMLEventObj2.button sets or retrieves the [...] pressed by
the user
A: mouse button

Q: wb: IHTMLScriptElement.[...] retrieves or sets the text of the
object as a string
A: text

Q: wb: IDM_[...] removes the formatting tags from the current
selection
A: REMOVEFORMAT

Q: wb: IHTML[...]2.selection can be an insertion point, or a
highlighted block of text or other elements in the document upon
which the user or a script can carry out an action
A: Document

Q: wb: IHTML[...].fromElement and toElement methods are meaningful
only when processing the onmouseover and onmouseout events
A: EventObj

Q: wb: IHTMLTxtRange.select makes the selection equal to [...]
A: the current object

Q: wb: ITHMLEventObj.y: If the mouse is outside the window at the
time the event fires, this property returns [...]
A: -1

Q: wb: To change encoding to Unicode UTF-8 do:
Q: IHTMLDocument2(WebBrowser1.Document).Charset:='[...]';
A: utf-8

Q: wb: IHTMLDocument2.[...] retrieves an interface pointer to a
location object
A: location

Q: wb: IDM_[...] removes any bookmark from the current selection
A: UNBOOKMARK

Q: wb: IHTMLDocument2.[...] retrieves an interface pointer to an
object representing the active selection
A: selection

Q: wb:[...] event occurs after the WebBrowser control navigates to a
new URL
A: NavigateComplete2

Q: wb: NavigateComplete2 event occurs after the WebBrowser control
navigates to [...]
A: a new URL

Q: wb:[...] event occurs before the WebBrowser control navigates to
a new URL
A: BeforeNavigate2

Q: wb: IHTML[...].findText searches for text in the document and
positions the start and end points of the range to encompass the
search string
A: TxtRange

Q: wb: IHTMLStyle.[...] sets or retrieves the name of the font used
for text in the object
A: fontFamily

Q: wb: IHTMLElement2.canHaveChildren indicates whether the object
can contain [...]
A: children

Q: wb: IHTMLTxtRange.[...] searches for text in the document and
positions the start and end points of the range to encompass the
search string
A: findText

Q: wb: IHTMLElement.[...] sets or retrieves the plain text between
the start and end tags of the object
A: innerText

Q: wb: IHTMLElement.[...] retrieves the string identifying the object
A: id

Q: wb: When an element is control-selected, a user can drag or
delete the element with[...] as a single unit
A: all its contents

Q: wb: IHTMLEventObj.fromElement and the IHTMLEventObj.[...] methods
are meaningful only when processing the onmouseover and onmouseout
events
A: toElement

Q: wb: When an element is [...]-selected, a user can drag or delete
the element with all its contents as a single unit
A: control

Q: wb: TextRange.boundingHeight retrieves the height of the[...]
that bounds the TextRange object
A: rectangle

Q: wb: IHTMLElement.className sets or retrieves the[...] of the
object
A: class

Q: wb: IHTMLDocument2.[...] retrieves the MIME type for the file
A: mimeType

Q: wb: IHTMLWindow3.[...] prints the document associated with the
window
A: print

Q: wb: TextRange.[...](unit, count) moves the end point of the text
range by the specified number of units
A: moveEnd

Q: wb: IHTMLWindow2.[...] closes the current browser window or HTML
Application
A: close

Q: wb: HTML tag bdo allows authors to disable the [...] algorithm
for selected fragments of text
A: bidirectional

Q: wb: To customize printing and the Print Preview, use the
IDM_PRINT and IDM_[...] commands
A: PRINTPREVIEW

Q: wb: IDM_[...] inserts a hyperlink on the current selection, or
displays a dialog box enabling the user to specify a URL to insert
as a hyperlink on the current selection
A: HYPERLINK

Q: wb: IHTMLElement.contains checks whether the given element [...]
A: is contained within the object

Q: wb: IHTMLEventObj2.button sets or retrieves the[...] button
pressed by the user
A: mouse

Q: wb: TextRange.moveEnd(unit, count) moves the end point of the
text range by [...]
A: unit

Q: wb: IHTMLWindow2.[...] loads the specified URL to the current
window.
A: navigate

Q: wb: IDM_[...] overwrites a button control on the text selection
A: BUTTON

Q: wb: IHTMLEventObj2.[...] sets or retrieves the mouse button
pressed by the user
A: button

Q: wb: To set encoding to UTF-8 do: IHTMLDocument2
(WebBrowser1.Document).[...]:='utf-8';
A: Charset

Q: wb: IHTMLWindow2.navigate loads the specified[...] to the current
window
A: URL

Q: wb: IHTMLDocument2.fileCreatedDate retrieves the[...] the file
was created
A: date

Q: wb: IHTMLWindow2.[...] sets or retrieves a reference to the
window that created the current window
A: opener

Q: wb: IHTML[...]3.print prints the document associated with the
window
A: Window

Q: wb: TextRange.[...]() selects all of the text in the text range
A: select

Q: wb: IDM_GETFRAMEZONE returns the[...] zone of the current page in
the web browser
A: security

Q: wb: The navigator object: appVersion keeps the[...] information
A: version (the release number, the operating system, and whether
it's the International version)

Q: wb: IDM_[...] sets an element's position property to "absolute"
A: ABSOLUTE_POSITION

Q: wb: IDM_[...] overwrites a list box selection control on the text
selection
A: LISTBOX

Q: wb: TWebBrowser draws on the functionality of Shell Doc Object
and Control Library ([...].DLL)
A: SHDOCVW

Q: wb: To show 50% smaller document use:
WebBrowser1.OleObject.Document.Body.Style.[...]:=0.50;
A: Zoom

Q: wb: IHTMLTable2.[...] displays the first page of records in the
data set to which the table is bound
A: firstPage

Q: wb: TWebBrowser.[...] refreshes the document in the browser
A: Refresh

Q: wb: IDM_DROPDOWNBOX overwrites a[...] selection control on the
text selection
A: drop-down

Q: wb: To show 50% smaller document use:
WebBrowser1.OleObject.Document.Body.[...].Zoom:=0.50;
A: Style

Q: wb: IHTMLDocument2.[...] retrieves the date the file was created
A: fileCreatedDate

Q: wb: IHTMLElement.all retrieves the[...] of all the objects in the
HTML that are within the scope of this object
A: collection

Q: wb: To show 50% smaller document use:
WebBrowser1.OleObject.Document.Body.Style.Zoom:=[...];
A: 0.5

Q: wb: TextRange.execCommand() method:[...] changes the input mode
to overwrite or insert
A: OverWrite

Q: wb: IHTML[...]2.navigate loads the specified URL to the current
window
A: Window

Q: wb:IHTMLStyle.[...] retrieves the value of the specified attribute
A: getAttribute

Q: wb: TextRange.[...]() scrolls the text range object into view in
the document window
A: scrollIntoView

Q: wb: IHTMLElement.[...] retrieves the collection of all the
objects in the HTML that are within the scope of this object
A: all

Q: wb: IHTMLElement2.[...] returns the component located at the
specified coordinates via certain events
A: componentFromPoint

Q: wb: IHTMLEditDesigner interface is used to customize the behavior
of the [...] Editor
A: MSHTML

Q: wb: TextRange.[...] retrieves the distance between the left edge
of the rectangle that bounds the TextRange object and the left side
of the object that contains the TextRange
A: boundingLeft

Q: wb: [...]_FORECOLOR sets or retrieves the foreground (text) color
of the current selection
A: IDM

Q: wb: IHTMLDocument2.selection can be any elements in the document
upon which the user or a script can [...]
A: carry out an action

Q: wb: IHMLElement2.[...] retrieves the height of the object
including padding, but not including margin, border, or scroll bar
A: clientHeight

Q: wb: IHTML[...]2.componentFromPoint returns the component located
at the specified coordinates via certain events
A: Element

Q: wb: TextRange.boundingLeft retrieves the distance between the
left edge of the rectangle that bounds the TextRange object and the
left side of the [...]
A: object that contains the TextRange

Q: wb: WebBrowser1.Document.[...].InnerHTML := 'Hello World!';
A: Body

Q: wb: IHTMLElement2.componentFromPoint returns the component
located at the specified[...] via certain events
A: coordinates

Q: wb: IDM_[...] opens the Print Preview window for the current
document using either the default print preview template or a custom
template
A: PRINTPREVIEW

Q: wb: IDM_UNBOOKMARK removes any bookmark from [...]
A: the current selection

Q: wb: IHTMLEventObj.keyCode sets or retrieves the Unicode[...]
associated with the key that caused the event
A: key code

Q: wb: IHTMLEventObj.type retrieves the event name: e.g. "[...]"
A: mousedown

Q: wb: IHTMLStyle.fontFamily sets or retrieves [...] used for text
in the object
A: the name of the font

Q: wb: IHTMLEventObj.keyCode is [...] if no key caused the event
A: 0

Q: wb: HomeSite is one of the most widely-used HTML editors on the
market, and was also among the first to host the[...] control
A: WebBrowser

Q: wb: IHTMLCurrentStyle.accelerator retrieves a string that
indicates whether [...]
A: the object contains an accelerator key

Q: wb: IDM_FORECOLOR sets or retrieves the foreground (text) color
of the [...]
A: current selection

Q: wb: IHTMLDocument2.[...] indicates whether the current command is
supported on the current range
A: queryCommandSupported

Q: wb: IDM_JUSTIFYCENTER centers the format block in which [...]
A: the current selection is located

Q: wb: IDM_[...] centers the format block in which the current
selection is located
A: JUSTIFYCENTER

Q: wb: IHTMLDocument2.[...] sets or retrieves the string value of a
cookie
A: cookie

Q: wb: IHTMLElement.[...] retrieves the width of the object relative
to the layout or coordinate parent
A: offsetWidth

Q: wb: IHMLElement2.clientHeight retrieves the height of the object
including padding, but not including [...]
A: margin, border, or scroll bar

Q: wb: IDM_[...] sets or retrieves the font size for the current
selection
A: FONTSIZE

Q: wb: IDM_[...] left-justifies the format block in which the
current selection is located
A: JUSTIFYLEFT

Q: wb: IHTMLDocument2.selection can be an insertion point, or a
highlighted block of text or other elements in the document upon
which the user or a[...] can carry out an action
A: script

Q: wb: IHTMLElement2.[...] creates a controlRange collection of
nontext
A: createControlRange

Q: wb: HTMLElement.[...] retrieves whether a TextRange object can be
created using the object
A: isTextEdit

Q: wb: IHTMLControlRange.[...] causes the object to scroll into
view, aligning it either at the top or bottom of the window
A: scrollIntoView

Q: wb: IHTMLElement.id retrieves the[...] identifying the object
A: string

Q: wb: IHTML[...].contains checks whether the given element is
contained within the object
A: Element

Q: wb: IDM_[...] prints the current document using either the
default print template or a custom print template
A: PRINT

Q: wb: IHTMLElement2.[...] causes the element to lose focus and
fires the onblur event
A: blur

Q: wb: IHTMLDocument2.queryCommandState returns a Boolean value that
indicates the current[...] of the command
A: state

Q: wb: IDM_INSINPUTBUTTON overwrites a[...] on the text selection
A: button control

Q: wb: IHTMLElement.[...] checks whether the given element is
contained within the object
A: contains

Q: wb: TextRange.boundingLeft retrieves the distance between the
left edge of the rectangle that bounds the[...] object and the left
side of the object that contains the TextRange
A: TextRange

Q: wb: IHTMLDocument2.[...] retrieves the file size
A: fileSize

Q: wb: IHTMLEventObj2.[...] sets or retrieves a value that indicates
the state of the ALT key
A: altKey

Q: wb: IDM_BLOCKFMT sets or retrieves the current block format [...]
A: tag

Q: wb: IHTMLElement2.[...] retrieves the distance between the
offsetTop property and the true top of the client area
A: clientTop

Q: wb: IHTMLEventObj.x retrieves the x-coordinate of the mouse
pointer's position relative to [...]
A: the parent element

Q: wb: TextRange.[...] returns a value indicating whether one range
is contained within another
A: inRange

Q: wb: IHTMLEventObj4.wheelDelta sets or retrieves the distance and
direction the [...] has rolled
A: wheel button
 
哇,好多,花了半天才打开网页,谢谢两位,希望其他大富翁们继续!
 
楼主该结分了吧?
 
可实际上我希望有更多的大富翁能够分享他们的经验,在这里留下示例代码等东东,
也为后来者提供一个方便。
 
请问。
Q:wb
A:这是什么格式?其它的看起来倒像是帮助文件,是介绍什么的使用啊?
 
请问怎么使用上面所说有那些命令。

如:IDM_Font

需要用到什么单元?
 
历时近半年的帖子,1246位大富翁浏览,竟然只有23位大富翁回复!!!
而且有用的信息寥寥无几!!!
大富翁们,该反思一下了!!!
 
顶部