After you install UltraWOL, you can access its properties, methods, and events, which the Ultrajones Software Web site lists. However, when I use a new OCX, I'm always extra careful that I'm using it correctly. So, to explore the OCX's contents, I opened the Object Browser in Microsoft Word 2002 by selecting Tools, Macro, Visual Basic Editor, then pressing F2. (Previous versions of Word might not have F2 support. If pressing F2 doesn't work, you can open the Object Browser from the View menu.) UltraWOL wasn't in the list of available objects to browse, so I added a reference by selecting References on the Tools menu, clicking Browse, finding and highlighting ultrawol.ocx, then clicking Open. Figure 1 shows the References dialog box after I added the OCX reference.
With UltraWOL now in the list of available objects, I selected that object and explored its properties, methods, and events. As Figure 2 shows, the object has four properties (BroadcastAddr, LocalIP, MACAddr, and Version), one method (WakeUp), and two events (WOLComplete and WOLError). The Object Browser not only lists an object's properties, methods, and events but also tells you how to use them. Highlighting a property, method, or event prompts the Object Browser to display the syntax in the status bar at the bottom of the window, as Figure 2 shows. . . .
charlieyang July 02, 2006 (Article Rating: