I'm a big fan of using the DHTMLEdit control myself. It offers HTML-based capabilities similar to those of the RichText control and beyond. For displaying and allowing entry of HTML documents I find it far superior to hosting a WebBrowser control. There are two issues with this control. First you'll want to obtain and install the DHTMLEdit SDK, which will provide you with documentation in the form of a CHM Help file. This is hard to find, but the redist file is named dhedsdk.exe so you might try searching for that. Secondly, Microsoft found some serious security vulnerabilities in the control especially when hosted in a Web page. As a result they pulled it from Vista. The good news is that they introduced a new safer version that works in Vista but you need to download and install it. When distributing programs using the DHTMLEdit control you really want to include this new version of DHTMLED.OCX along with its dependency TRIEDIT.DLL (which does the real work). Sadly, unless you develop on Vista this can be a problem. However you can install the new version into Vista and then take those two files to another OS and replace the existing files (rename the old ones first so you can undo this in case of problems). Finally, to answer your question, the DHTMLEdit control property you probably want is called BrowseMode. Set this to True and users cannot edit the contents of the control. This property is only available in the version of the control that is not marked "safe for scripting" - i.e. only in the version you should use in a VB program. Note that flipping the value will caused the document to be re-parsed and the Busy property will be True until it finishes (when the DocumentComplete event is fired). There are lots more details in the SDK Help.
|