12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Quiz<br />

More on Projects<br />

Q When I start my application, my ma<strong>in</strong> form isn’t displayed, but <strong>in</strong>stead one of<br />

my dialog boxes is displayed. What gives?<br />

A You have accidentally set the ma<strong>in</strong> form for the application to be the dialog form.<br />

Go to the Project Options dialog box, click on the Forms tab, and select your ma<strong>in</strong><br />

form from the Ma<strong>in</strong> Form combo box on the top of the page. Run your program<br />

aga<strong>in</strong>, and the ma<strong>in</strong> form will be displayed as you would expect.<br />

Q All those project compiler and l<strong>in</strong>ker options confuse me. Do I need to know<br />

about each of those options to write programs with <strong>C++</strong>Builder?<br />

A No. The default project options work well for almost all <strong>C++</strong>Builder applications.<br />

At some po<strong>in</strong>t you may get further <strong>in</strong>to the mysteries of the compiler and l<strong>in</strong>ker,<br />

and at that time you can learn more about the project options. Until then, don’t<br />

worry about them.<br />

Q When my application is m<strong>in</strong>imized, the icon and caption do not match what I<br />

set up <strong>in</strong> my application’s ma<strong>in</strong> form. Why not?<br />

A Sett<strong>in</strong>g the icon and caption of the ma<strong>in</strong> form does not affect the way your<br />

application is displayed when m<strong>in</strong>imized. To set the caption and icon for the<br />

application, go to the Project Options dialog box, choose the Application page, and<br />

supply the application name and icon.<br />

Q Can I open several source files at one time <strong>in</strong> the Code Editor?<br />

A Yes. You can either choose File | Open and select multiple files to open, or you can<br />

select a group of files <strong>in</strong> W<strong>in</strong>dows Explorer and drop them on the Code Editor.<br />

Q Can I f<strong>in</strong>d and replace a variable name across all my source files?<br />

A No. You will have to open each source file and execute the Replace dialog box <strong>in</strong><br />

each source file. You can, however, use the F3 key to repeat the last f<strong>in</strong>d or replace<br />

command. Remember not to change any <strong>C++</strong>Builder-generated variable names.<br />

Q I f<strong>in</strong>d that 32,767 undo levels is not enough for my needs. What do you<br />

suggest?<br />

A Don’t quit your day job.<br />

1. How can you quickly switch between a unit’s form and source code when work<strong>in</strong>g<br />

with <strong>C++</strong>Builder?<br />

2. If you remove a file from your project via the Project Manager, is the file removed<br />

from your hard drive?<br />

3. How do you set the ma<strong>in</strong> form for an application?<br />

4. What does it mean if you do not have <strong>C++</strong>Builder auto-create forms?<br />

389<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!