Microsoft KB Archive/156173

= HOWTO: Use the New Class Browser in Visual FoxPro =

Article ID: 156173

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156173



SUMMARY
The Class Browser has been updated for Visual FoxPro 5.0. It includes new functionality. This article describes tips for using some of these new features.



MORE INFORMATION
Following are some tips for using the new Class Browser:

 You can right-click the Open and Add toolbar buttons to display a list of the last eight files that were opened in the Class Browser and that are not currently displayed in the active Class Browser window. Click the desired class from the list to reopen it. You can use Shift+F10 to bring up the right-click Shortcut menu. You can right-click in the Class Browser and click Export on the Shortcut menu to export a class definition to a .prg file.  You can default to a specific class and member name when you are starting up the Class Browser programmatically. See the following example: DO (_browser) WITH "mylib","myclass.cMessage"   You can drag and drop the class icon from within the Class Browser onto the Command window to execute the following commands (the icon to drag is located next to the Type drop-down list box in the Class Browser): SET CLASSLIB TO ADDITIVE objectvar=CREATEOBJECT  You can rename methods and properties with the Class Browser by right- clicking on the method or property and clicking Rename on the Shortcut menu. If you rename or move a class, all .vcx and .scx files open in all instances of the Class Browser window are updated automatically if they contain those subclasses or instances. So, if you rename a class, it is recommended that all .vcx and .scx files that use that class or subclass are loaded in the Class Browser window. If a form is not in the Class Browser when a class it contains is renamed, an instantiation error occurs when you open the form. The Class Browser asks you to locate the class. You can drag and drop a class between two instances of the Class Browser. To copy, hold down the control key during the drag.</li>  You can drag and drop an instance of the selected class onto a running form or container, adding it to that container (or desktop, which adds to _screen). You can also do this manually. First, select the class that you want to create in the Class Browser, then click in the Command window to place the blinking cursor in the Command window. Second, move the mouse pointer to a form or the Visual FoxPro desktop, making sure the blinking cursor is still in the Command window. Then, in the Command window, execute the following command: _oBrowser.FormAddObject(SYS(1270)) An instance of the class is created where the mouse is located. </li> Type library information can be viewed by doing the following:

<ol> In the Class Browser, click the Open button or the View Additional File button.</li> In the Files of type drop-down list in the Open dialog box, choose Application, *.olb, or *.tlb.</li></ol>

The type library information for the selected file is displayed in the Members list. (You can view this information in Help by searching for type library .)</li></ul>

Keywords: kbhowto KB156173

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.