Sie sind auf Seite 1von 5

7/9/13

Using the project manager

Using the Project Manager


This document is reprinted from the Microsoft DevCon 95 Speaker materials and is provided "as-is." This document and any associated demo files were created using Visual FoxPro 3.0. Some features discussed may have changed in Visual FoxPro 5.0.
Susan Graham Microsoft Corporation

Introduction
Welcome to Microsoft Visual FoxPro, the powerful new object-oriented environment for database construction and application development. Visual FoxPro provides the tools you need to manage data, whether you are organizing tables of information and running queries, creating an integrated relational database system, or programming a fully-developed data management application for end users. The easiest way to get familiar with Visual FoxPro is to start it and begin using the Project Manager. The Project Manager provides an easy, visual way to organize and work with tables, files, databases, reports, queries, and other files when managing tables and databases or creating an application. If you have your own set of tables from earlier versions of FoxPro, you can add them to a project immediately to get a feel for how Visual FoxPro works. If you have other data you want to organize (be it in spreadsheets, text files, or tables from other applications), you can import them into Visual FoxPro and add them to a project. There are also some sample files provided for you to work with as you become familiar with Visual FoxPro and the Project Manager. These samples, TESTDATA.DBC and TASTRADE.DBC, are located in the Samples subdirectory where you installed Visual FoxPro. Using the Project Manager The Project Manager is the primary organizational tool for working with data and objects in Visual FoxPro. A project is a collection of files, data, documents, and Visual FoxPro objects that is saved as a file with a .PJX extension. You can use the Project Manager to organize and manage files as you create tables and databases, write queries, set up forms and reports, and build applications. For more information about building applications with the Project Manager, see the Developers Guide included in your Developer Conference materials. The Project Manager presents an organized, hierarchical view of your data. To focus on a particular type of file or object in your project, click the appropriate tab. When you are setting up tables and databases and creating forms, queries, views, and reports, you work primarily with the items shown under the Data and Documents tabs. Organizing Data with the Data Tab This tab contains all the data for a project: the databases, free tables, queries, and views. Databases are sets of related tables. You create a database by relating tables in the Database. Database files have a .DBC extension. Free tables are tables which are not part of a database and are stored in a file with a .DBF extension. Queries are a structured way to request specific information stored in tables. Using the Query Designer, you format a question that extracts records from your tables based on the criteria you enter. Queries are saved as files with a .QPR extension.
www.dfpug.de/loseblattsammlung/migration/whitepapers/projman.htm 1/5

7/9/13

Using the project manager

Views are specialized queries that enable you to access remote data and update data sources by making changes to the records returned by the query. Views exist only within a database and are not independent files. Organizing Documents with the Documents Tab The Documents tab contains all the documents you use when working with data: forms for entering data, and reports and labels for printing out tables and query results. Forms are used to display and edit the contents of tables. Reports are files that tell Visual FoxPro how to format and print the results of queries run on tables Labels are special reports formatted to print on label stock. Organizing Classes with the Classes Tab The Classes tab in the Project Manager contains the available visual classes (.VCX). A visual class is a library file containing one or more class definitions. Organizing Code with the Code Tab The Code tab in the Project Manager contains available programs (.PRG), API libraries and other applications. Organizing Other types of files with the Other Tab The Other tab in the Project Manager contains all remaining files including menus, text files and other files such as spreadsheets, etc. Viewing the Contents of a Project The items in the Project Manager are organized in an outline-like view that you can expand or collapse to look at different levels of detail. A plus sign appears next to a symbol if there are one or more items of that type in the project. Click the plus sign next to a symbol to display the names of items of that type in the project. Click the plus sign next to the name of an item to see the components of that item. For example, click the plus sign next to the Free Tables symbol to see the names of free tables in the project; click the plus sign next to a table name to see the names of the fields and indexes within that table. To collapse a list once it is expanded, click the minus sign that appears next to the list. Adding and Removing Files To use the Project Manager, you must add existing files to it or use it to create new files. For example, if you have a set of existing .DBF tables you want to add to a project, just select Free Tables in the Data tab, and use the Add button to add them to the project. To add a file to a project 1. 2. 3. Select the item you want to add. Click the Add button. In the Open dialog, select the name of the file you want to add.

To remove a file from a project


1. 2. Select the element you want to remove. Click the Remove button.

Creating and Modifying Files


www.dfpug.de/loseblattsammlung/migration/whitepapers/projman.htm 2/5

7/9/13

Using the project manager

The Project Manager simplifies creating and changing files. Just choose the type of file you want to create or modify and click the New or Modify button. Visual FoxPro displays the design tool appropriate to the type of file you selected. To create a file to add to the Project Manager 1. 2. Select the element you want to create. Click the New button.

You are prompted to name the new file. With some items, you have the option of using a wizard to help you create the file.
To modify a file 1. 2. Select an existing file. Click the Modify button.

For example, to modify a table, select the name of the table and choose Modify to display the table in the Table Designer.
Viewing Tables From the Project Manager, you can browse the contents of the tables in your project. To browse a table 1. 2. Select the Data tab. Select a table and click the Browse button.

Viewing tables in Browse mode is discussed in Chapter 3, Working with Tables.


Adding Files From One Project to Another You can have more than one project open at the same time and you can drag files from one project to another. The files are not duplicated, because the project stores only a reference to the file. Files can simultaneously be associated with different projects. To add files from a project to another project 1. 2. Select the file in the Project Manager. Drag it to the container for another project.

Customizing the Project Manager


Initially the Project Manager appears as a separate window. You can move the container around, resize it, or collapse it so that only the tabs show. To move the Project Manager Place the pointer in the title bar and drag the Project Manager to a new location on your screen.

To resize the Project Manager


Place the pointer on the top, bottom, side, or corner of the Project Manager window, and drag to increase or decrease size.

To collapse the Project Manager


Click the up arrow in the upper-right corner.

You can easily return the Project Manager to its usual size.
To restore the Project Manager
www.dfpug.de/loseblattsammlung/migration/whitepapers/projman.htm 3/5

7/9/13

Using the project manager

Click the down arrow in the upper-right corner.

When the container is collapsed, you can tear off and arrange individual tabs to suit your workspace preferences. When you tear off a tab, it floats independently in the main FoxPro window.
To tear off a tab 1. 2. Collapse the container. Select a tab and drag it away from the Project Manager.

If you want the tab to always remain on top, click on the pushpin icon at the top of the tab. The tab will remain on top of other FoxPro windows. You can set more than one tab to be always on top. To remove the always on top setting on a tab, click the pushpin icon again.
To restore a tab Click the X button on the tab. Or Drag the tab back into the Project Manager.

You can also attach or dock the Project Manager so that it appears as a toolbar on the top or bottom of your main FoxPro window.
To dock the Project Manager 1. 2. Collapse the Project Manager. Drag the Project Manager to the top or bottom of the main FoxPro window.

When the Project Manager is docked it becomes part of the toolbar area of the window. You cant expand the Project Manager window when its docked; instead, you click on individual tabs to use them. You can also tear off tabs from a docked Project Manager.
Introducing the Visual FoxPro Design Tools The Project Manager gives you quick access to the Visual FoxPro design tools. These tools make it easy to create tables, forms, databases, queries, and reports to manage your data. Use of the tools is described in different chapters in this book. You can also assemble the items you create with the design tools into an application. Creating an application from tables, databases, and forms is discussed in the Developers Guide. If you choose, you can also use the design tools independently of the Project Manager by using the options of the New command on the File menu. The following table summarizes which tool to use to accomplish different tasks: To Use this design tool Create tables and set indexes on tables Table Designer Run queries on local tables Query Designer Run queries on remote data sources; create updatable queries View Designer Create a form for viewing and editing the data in your tables Form Designer

View and create relationships between tables; set up a database Database Designer
To use the design tools to create new files In the Project Manager, select the type of file you want to create, and choose the New
www.dfpug.de/loseblattsammlung/migration/whitepapers/projman.htm 4/5

7/9/13

Using the project manager

button.

Using Wizards
Wizards are interactive programs that can help you quickly accomplish common tasks, such as creating forms, formatting reports, and setting up queries. By answering questions or choosing options on the series of wizard screens, you are telling the wizard to build a file or perform a task based on your responses. For example, if you choose the Report Wizard, you can select the type of report you want to create. The wizard then asks you which table you want to use and provides choices for formatting the report. Starting a Wizard When you create a new item using the Project Manager or the File menu, you can choose to use a wizard to help you create the item. To start a Wizard 1. In the Project Manager, select the type of file you want to create, and choose the New button. You can also choose New from the File menu, and select the type of file you want to create. 2. Select the Wizard option.

You can also access the wizards directly by choosing the Wizards command on the Tools menu.
Navigating the Wizard Screens Once you have the wizard running, just answer the questions on each screen, and choose the Next button when you are ready to proceed to the next screen. If you make a mistake or change your mind, choose the Back button to see the previous screen so you can make changes. Choose Cancel to exit the wizard without producing any results. If you have a question about using the wizard, choose the Hint button to see more information. When you reach the last screen, choose the Finish button when you are ready to exit the wizard. If you are in a hurry, you can choose the Finish button to proceed to the end of the wizard sequence, skipping the entry of optional information and using defaults supplied by the wizard. Saving Wizard Results The last screen of each wizard might ask you to supply a title and, depending upon the type of wizard you are using, give you save, browse, modify, or print options. Use the Preview option to see the results of the wizard before you are finished with the wizard. You can rerun the wizard if you want to make different choices to change the results. When you are satisfied with the wizard results, choose the Finish button. Modifying Wizard-Created Items One you have created a table, form, query, or report, you can open it in the appropriate design tool and make further changes to it. You cannot re-open a wizard-generated file with a wizard, but you can preview the wizard results and make changes before exiting the wizard.

www.dfpug.de/loseblattsammlung/migration/whitepapers/projman.htm

5/5

Das könnte Ihnen auch gefallen