Delphi 3 Pro


Delphi 3
Ready to Start Work with Delphi 3? We've included all the Delphi Hands On tutorials from the last year on this CD to help you along - you'll find them here. If you're an old Delphi guru, here are a few guidelines on version 3...

When installing Delphi 3 from the SuperCD, click the Delphi 3 Standard icon in the Setup Launcher dialog. A set of dialogs now guides you through the remainder of the installation process. Be sure to read the text in the 'Install Information' panel before completing the installation.

If you already have a copy of Delphi 2 installed, you may want to uninstall this prior to installing Delphi 3. If you do this, be sure you back up your own program code first. Alternatively, you can install Delphi 3 into a new directory and leave your existing installation of Delphi 2 alone. Note, however, if you uninstall Delphi 2, this may have the effect of uninstalling certain files that are required by Delphi 3. If you experience any problems, you should re-install Delphi 3.

Once Delphi 3 has been installed, you will no doubt want to get down to some programming. Anyone who is already familiar with an earlier release will find no problem in adjusting to Delphi 3. For a quick tour of the new features, read our introductory tutorial in the SuperCD pages of this month's PC Plus, then refer to the 'What's New' section of the help system.
If you haven't used Delphi before, follow these instructions to create your first application - a simple VAT calculator.


  1. Select File Menu, New Application.

  2. In the Standard palette at the top of the screen, click Edit (4th icon). Click the form to add an Edit field to the Form. Repeat this procedure. Your form should now contain two edit fields.

  3. Again, using the Standard palette, add two labels (3rd icon) and one button (6th icon). Position these and resize the form so that it looks like this:



  4. Select Edit1 on the form. In the Object Inspector panel at the left, select the Text property and delete the highlighted text, 'Edit1'. Do the same to delete the text from Edit2.
    5. Select Label1. In the Object Inspector, edit its Caption property to: 'Sub Total:'. Select Label2 and edit its caption to 'Grand Total:'. Edit Button1's Caption to 'Calculate'.

  5. On the form, double-click Button1. This will place you in the code editor. Edit the procedure named TForm1.Button1Click by adding code as follows:

    procedure TForm1.Button1Click(Sender: TObject);
    var
    subtot, vat: double;
    errcode : integer;
    begin
    Val(Edit1.Text, subtot, errcode );
    if errcode <> 0 then
    ShowMessage('You must enter a number!')
    else
    begin
    vat := subtot * 0.175;
    Caption := 'VAT = ú' + FloatToStr(vat);
    Edit2.Text := 'ú'+ FloatToStr(subtot + vat);
    end;
    end;

    Run the application by pressing [F9]. Enter a value into the Subtotal field and click the button. Try entering 100. You should see this:

    Now enter the word, 'Ten'. This time, you should see this:

To understand what's going on in the code, you need to know the following: In Delphi, each variable such as subtot is predeclared in the VAR section. The Val() procedure converts a string to a number and returns an error code if the conversion fails. ShowMessage() is a built-in procedure that displays a simple message dialog. Caption refers to the Caption property of the current Form and FloatToStr() is a function for converting a floating point value to a string representation. If you need more detailed information, you can highlight a procedure name in the editor and press [F1].


Product Details

Contact: Borland UK
Phone: +44 (0)118 932 0022
Fax: +44 (0)118 932 0017
Web: http://www.borland.com/
Email: desk@borlandinfo.co.uk
Online support: http://www.borland.com/devsupport/ (Note: no Borland support is available with this version).

Price: £469

Limitations: Personal use only. For full details, please see the License Agreement.

Minumum System Requirements: Intel 486DX/66 MHz or higher, Windows 95 or Windows NT4 (SP2 or higher), 12Mb RAM (16MB recommended), 60Mb hard disk space, VGA or higher resolution monitor. Networks supported: Windows 95 or NT 4.0 or higher.

Uninstall: Yes - Add/Remove Programs in the Control Panel.


Installation


Click to install Delphi Click the icon to the left to install Delphi 3.