x

EMBARCADERO RADSTUDIO


GETTING STARTED

RadStudio Opening Screen


Create a New VCL Forms Application


Select PROJECT / OPTIONS and check to see if "Runtime Packages" is UNCHECKED in the three locations below.
Hopefully, if you check DEFAULT those choices will stick; but don't count on it!
If your want your executable to run on any PC, whether or not it has Embarcadero's RadStudio installed, you need to UNCHECK or FALSIFY all three of these.


1) UNCHECK "Runtime Themes."


2) UNCHECK "Runtime Packages."


3) Set "Dynamic RTL" to FALSE.

Check "Default." With luck your choices may stick.




Look in the top right corner to confirm that all the components of your project have the same number, preferably "1".
The should be numbered "1."
If the PROJECT, UNIT and FORM numbers are not the same, rename them now.
You will have to change the FORM number in the OBJECT INSPECTOR.


x

x


Before doing anything else, select FILE / SAVE PROJECT AS.
Create a NEW FOLDER with a distinctive name on the DESKTOP and then OPEN IT.
Accept the default file names and click SAVE twice.


Stretch the OBJECT INSPECTOR and the TOOL PALETTE to near maximum height. They will be easier to work with.
Alternatively, you may simply CLOSE the upper-left and upper-right sub-windows.


The DESIGN tab provides you with a WYSIWYG editor for the FORM.
The FORM is synonymous with your application's WINDOW.

The UNIT1.CPP tab displays your SOURCE CODE.
RadStudio has written enough to get you started.
This is where you will write your description of how your world works.


Before you begin, let's do some housekeeping.
Any statement preceded by "//" is called a COMMENT or REMARK and is ignored by the computer.
COMMENTS are there to give your code some structure and to remind you what you've done.


Let's go back to the DESIGN tab.
Open the STANDARD TOOL PALETTE and select the TBUTTON visual component.
Click on the FORM to place it there.

Double-click that BUTTON and RadStudio will automatically write the outer shell of an EVENT HANDLER for you.
When BUTTON1 is CLICKED, the computer will go here to find out what to do.

Scroll up and you will see that the EVENT HANDLER has been added at the bottom of our SOURCE CODE.
Let's say we want FORM1 to turn RED when BUTTON1 is clicked.
As you type in the instruction, note that RadStudio will try to anticipate your intent.
This can be handy, but be careful since RadStudio cannot read your mind.

Note: You must fill in the body of an EVENT HANDLER or it will vanish after pressing the GREEN RUN ARROW.
NEVER write the outer shell of an EVENT HANDLER yourself. Let RadStudio create it.
NEVER delete the outer shell of an EVENT HANDLER yourself. Empty its contents. RadStudio will delete it.

Finish typing in the statement. Then press the GREEN RUN ARROW.

RadStudio will LINK, COMPILE and RUN (EXECUTE) your code.
Test it. Press the BUTTON. The window, FORM1, should turn red.
Note that when your APPLICATION is executed, FORM1 has no guide dots on it.
Only when the APPLICATION is in RadStudio, in the WYSIWYG FORM editor, under the DESIGN tab, will you see the guide dots.

Close the EXECUTABLE.
This will return you to RadStudio.

Every time your application compiles and runs without error, select FILE / SAVE ALL.
Do this often.
If you DO NOT do this and something happens (which it will), you will have no backup.
NEVER select FILE / SAVE PROJECT AS again.
NEVER NEVER select FILE / SAVE PROJECT AS and direct it to another location.


Select FILE / CLOSE ALL to end your work with RadStudio
Then close RadStudio itself.

COPY your project FOLDER from the DESKTOP to your USB stick..
COPY IT TO SEVERAL BACK-UP LOCATIONS.
EVERYTHING ON YOUR DESKTOP WILL VANISH WHEN YOU LOG OUT.



CONTINUING YOUR WORK

TO CONTINUE WORKING ON YOUR APPLICATION.
Copy the folder from your USB stick to the DESKTOP.
Open the folder on the DESKTOP (not the one on your USB stick).
Double-click on "Project1.cbproj" and you will be able to continue working on your application in RadStudio.
Your EXECUTABLE will be in the "Debug" folder.

x

Your EXECUTABLE will run alone (without any of the other files) on any PC computer.
Feel free to rename it, but make sure to keep the ".exe" extension.
You might rename it, "my-first-real-windows-application.exe".

x


OBJECTS, PROPERTIES and EVENTS

Note that HANDLES will appear on the FORM when you select it.
The FORM will also appear in the OBJECT INSPECTOR.
The PROPERTIES of the FORM will appear under the PROPERTIES tab.

Note that HANDLES will appear on the FORM when you select it.
The FORM will also appear in the OBJECT INSPECTOR.
The EVENTS that the FORM will respond to will appear under the EVENTS tab.

Note that HANDLES will appear on the BUTTON when you select it.
The BUTTON will also appear in the OBJECT INSPECTOR.
The PROPERTIES of the BUTTON will appear under the PROPERTIES tab.

Note that HANDLES will appear on the BUTTON when you select it.
The BUTTON will also appear in the OBJECT INSPECTOR.
The EVENTS that the BUTTON will respond to will appear under the EVENTS tab.


THE TOOL PALETTE

The TOOL PALETTE contains several Drag-And-Drop VISUAL COMPONENTS that we may use.

xxxx

xx


HELP

For HELP with C++, Windows and the Visual Component Library, select HELP.


The HELP window.


You will probably want to select the INDEX tab to look for a specific item.
Using HELP is something like CRYPTANALYSIS. You have to have some idea what you're looking for to have any hope of finding it.