|
Displaying HTML Documents Using Internet Explorer |
|
| Using IE in a VB.NET App | |
|
The book carefully explains how to view the methods and properties using the Object Browser (page 535) and how to get Visual Studio to display the object's events (page 541, "Responding to Internet Explorer Events"). But if you add the object as a member of the Toolbox, you get both automatically! Plus, you can drag and drop the object as a component into a Windows form. You can also generate the wrapper DLL using a command called the Windows Forms ActiveX Control Importer (Aximp.exe). You can learn more about the AxImp program at this MSDN web page. The section in the book that tells you how to use the Object Browser is an excellent introduction, but a better way to understand the objects, properties, methods, enumerations, and constants of IE is to look it up at Microsoft's MSDN web site. For example, the book demonstrates the use of the IE object using the Navigate method. MSDN explains that this method, "Navigates to a resource identified by a URL or to the file identified by a full path." But then you learn that there is also a Navigate2 method which, "Navigates the browser to a location that might not be able to be expressed as a URL, such as a pointer to an item identifier list (PIDL) for an entity in the Windows shell namespace." In general, always check MSDN for the documentation of Microsoft objects. Although you can't embed active elements (such as buttons and listboxes) in the HTML itself (without making this an ASP or ASP.NET application, that is), you CAN include the displayed HTML along with active elements in a standard Windows form application. This is only possible if you go beyond the techniques explained in the book and implement Internet Explorer as an ActiveX component as explained here in this lesson. |
|

