Collections - Shopping Go to another website with more information - SuperMemo Go to another website with more information - FAQ - Feedback - Contact us 
WebBrowser Control and MSHTML Editor in Delphi
Home > Sciences > Computer Science > WebBrowser Control and MSHTML Editor in Delphi
Recent additions
Report a bug The Contributors` Pantheon | Site map Site index
 
 Search
 
Match:
Format:
Sort by:
 
 About
 
Author(s): SuperMemo Research
 
 
No. of items: 354
Rating: 4.0 (out of 5)
Last updated: Dec 01, 2002
 
 
Privacy policy Go to another website with more information
 

Due to SuperMemo Library being moved to a new server, you can currently order this collection only as a subset of one of the mixes from Super Memory Store that are listed in the Order as part of... section you can find in the left pane of this page (if available). We sincerely apologize for any inconvenience this may cause.
Our entire assortment is being republished incrementally in order of priority as determined by the quality and popularity of individual collections. If you would like to increase the priority of this collection, contact us by writing to: publish (at) super-memory (dot) com with in the subject.

 Description
 
WebBrowser control has been an integral component of MS Windows following the browser wars with Netscape. Starting with SuperMemo 98, it has also underlain the HTML component in SuperMemo. With Internet Explorer 5.0, MSHTML DLL encapsulated in WebBrowser control implemented DHTML capabilities and provided access to HTML editing via the DOM model. As of Internet Explorer 5.5, MSHTML library superseded its predecessor DHTMLEdit control. Programmers are thus now able to provide HTML parsing, rendering and WYSIWYG editing without investing untold development hours or relying on third party components. Most HTML editors available on the market today capitalize on the WebBrowser control to provide HTML preview. They also often employ the MSHTML Editor for HTML editing. Microsoft software also relies heavily on the WebBrowser control. Apart from Internet Explorer, it is also used in Microsoft Money or in MS Outlook (Outlook Today page). In other words, investment in WebBrowser control is not likely to be wasted. This component is to remain an integral part of Windows. Not even the anti-trust action against Microsoft posed or poses any danger to this important component.

As of Internet Explorer 6.0, the reliability of MSHTML module became sufficient for an important decision: SuperMemo 2002 transferred the default incremental reading process from the old reliable RTF format to the HTML standard.

The RichEdit control (RTF text) has been a part of Windows for many years. Despite its multiple limitations, the component has been very stable and well documented. This still isn't true of the WebBrowser control. This relatively new implementation shows multiple stability problems. Naturally, you will not experience these in Microsoft products. Presumably, MS programmers are able to internally communicate the problems with the control in between individual development teams. Programmers outside Microsoft do not have this comfort and have to live with numerous problems posed by the control. In addition, the Delphi Active X control wrapper that encapsulates the WebBrowser control is incompatible with some of WebBrowser behaviors. In other words, WebBrowser is a blessing that may also cost lots of tribulation on the part of those who decide to encapsulate it in software for mass consumption.

SuperMemo 2002 successfully employs WebBrowser control in incremental reading. You can now view the source code that is used in SuperMemo to encapsulate TWebBrowser as a dedicated TWeb object. See: www.supermemo.com/source/tweb.htm

You can easily notice that 60-80% of the presented code includes various workarounds needed to make WebBrowser work within the framework of a SuperMemo component. Although the unit was written in two short months, resolving all bugs and problems took another six months that ultimately delayed the release of SuperMemo 2002.

The HTML encapsulation hierarchy in SuperMemo is now quite complex and provided for quite a development challenge as well ... as some stability problems that show particularly on non-NT platforms. The MSHTML DLL is encapsulated by WebBrowser which adds such functions as search, navigation, in-place hyperlinking, etc. WebBrowser is encapsulated in Delphi as TWebBrowser a standard VCL component with standard VCL interface. However, as you can see in the source code, the way OLE child controls live in VCL components resulted in the need to re-write the keyboard handler nearly from scratch. TWebBrowser is in turn encapsulated as TWeb (see the code), which is a SuperMemo-specific web browser component. TWeb implements functions such as LoadFile, SetFont, SetText, Paste, Undo, SelectAll, Find, etc. TWeb is then embedded in a TComponentEditor (derived from Delphi's TForm class). TComponentEditor is used to host all SuperMemo components in editing and dragging modes. Finally, components are hosted by the scrollbox of the element window (TForm) in the main SuperMemo program. The element window and the component editor implement the remaining functions such as ClozeDeletion, ExtractSelection, Highlight and close to 1000 other element- or component-specific functions.

The presented collection can be used to learn some of the most basic objects, methods, properties and commands that can be used to manipulate the DOM interface of the WebBrowser control. Having learned the presented collection, and re-using the presented source code, all Delphi programmers should be able to add rudimentary HTML capability to their software with minimum effort

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

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

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: You can make an individual element editable by using the element's [...] property
A: contentEditable

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

 
 
  Compatibility
 
To use this material you need the SuperMemo software Go to another website with more information. In the table below can you find what versions of SuperMemo the Basic Medical Spanish collection is compatible with

SM6 Go to another website with more information SM7 Go to another website with more information SM8 Go to another website with more information SM98 Go to another website with more information SM99 Go to another website with more information SM2000 Go to another website with more information SM2002 Go to another website with more information Palm SM Go to another website with more information SMCE Go to another website with more information
green check green check green check green check green check green check green check green check green check

 
 Download
 
WebBrowser Control and MSHTML Editor in Delphi, (SM2000 format or later, 112 KB)
Download time: < 1 min @ 56 Kbps

Download a free sample of all commercial collections available from SuperMemo Library:

Library Digest, (SM2000 format)

 
  Installation HelpDesk
 
The step-by-step procedure with instructions on how to install collections available from SuperMemo Library in:
SuperMemo 6 for DOS
SuperMemo 7 for Windows
SuperMemo 8 for Windows
SuperMemo 98 for Windows
SuperMemo 99 for Windows
SuperMemo 2000 for Windows
SuperMemo for Palm Pilot
SuperMemo for Windows CE
 
 What is SuperMemo?
 
  • SuperMemo makes it possible to learn fast and retain memories for years
  • SuperMemo is based on a breakthrough in scientific research on memory and learning
  • SuperMemo is available as a computer program for Windows
For more information...
 
Send e-mail to a friend
 
Do you have any comments, remarks or suggestions? Contact us
   Back to Top