Dragging and dropping

Dragging and dropping of items on a form can be a handy way to enable users to manipulate objects in a form. You can let users drag entire components, or let them drag items out of components such as list boxes into other components. There are four essential elements to drag-and-drop operations Every control has a property called DragMode that controls how the component responds when a user begins dragging the component at run time. If DragMode is dmAutomatic, dragging begins automatically when...

Beginning a project with a Project Template

Delphi's Project Templates provide you with predesigned projects that you can use as a starting point for your applications. Project Templates are part of the Gallery (located in the DELPHI GALLERY directory), which also provides Form Templates and Experts. When you begin a project from a Project Template (other than the Blank Project Template), you are prompted to specify a project directory, a unique subdirectory in which to store the new project files. If you specify a directory that doesn't...

Saving a separate version of the project file

Delphi enables you to save a separate version of an open project in a directory other than the project directory. The FilelSave Project As command initiates the process. However, because the open project might use shared files in addition to files that were created as part of the current project, the Save Project As command saves only a copy of the project source code (.DPR) file, project options settings (.OPT file), and the project resource (.RES) file to the new location. Important No unit...

Viewing the project source code DPR file

As with unit source code files, you can also open the project source code .DPR file in the Code Editor. The main reason to do this is so you can see the units and forms that make up the project, and which form is specified as the application's main form. As you add forms and units to the project, you can see Delphi's updates of the project source code. Caution Manually editing the .DPR file is not recommended. To view the .DPR file, use either of these methods Choose View Project from the...