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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TIP<br />

Figure 6.11.<br />

The About box with<br />

text labels added.<br />

The <strong>C++</strong>Builder IDE Explored: Projects and Forms<br />

The copyright symbol (©) has an ASCII value of 169. To create the<br />

copyright symbol, press and hold the Alt key and type the numbers<br />

0169 on the numeric keypad (be sure Num Lock is on). When you let<br />

go of the Alt key, the copyright symbol appears. You can <strong>in</strong>sert the<br />

ASCII value of any character this way. You must type all four numbers,<br />

though. For example, the ASCII value of a capital A is 65. To <strong>in</strong>sert an<br />

A, you would have to hold down Alt and type 0065 on the numeric<br />

keypad.<br />

Next we’ll add an icon to the About box:<br />

1. Click on the Additional tab on the Component Palette and choose the Image<br />

component. Place the component to the left of the text on the form.<br />

2. Locate the AutoSize property for the Image component and change it to true.<br />

3. Locate the Picture property and double-click the Value column. The Picture<br />

Editor dialog box is displayed.<br />

4. Click the Load button. In the File Open dialog box, navigate to the<br />

\CBuilder\Images\Icons directory and choose an icon from the icon files listed.<br />

Click OK. The icon you selected is displayed <strong>in</strong> the Picture Editor w<strong>in</strong>dow. Click<br />

OK aga<strong>in</strong> to close the Picture Editor. The icon is displayed on the form. Note that<br />

the Image component has sized itself to the size of the icon.<br />

5. Position the icon as desired.<br />

At this po<strong>in</strong>t we need an OK button on the form. I’ll be a little creative and show you a new<br />

component:<br />

1. If you’re not already there, click on the Additional tab on the Component Palette.<br />

Select the BitBtn component and place a BitBtn on the form near the bottom and<br />

centered horizontally.<br />

2. Locate the K<strong>in</strong>d property and change it to bkOK. Notice that a green check mark has<br />

appeared on the button, and the Caption property has changed to OK. That’s all we<br />

191<br />

6

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

Saved successfully!

Ooh no, something went wrong!