

To create a new form you need choose following command (Fig. The new form will be called after pressing on the button “Calculate”. In the new form you can output the result of calculation. To do this you need to select the form (component Form1) and in the property Caption enter the text “Volume of prism”.Īfter the changes and adjusting the size of components the application form has view as shown in Figure 3.

in the component Button1 property Caption = “Calculate”.Īlso, you need to change the title of form.in the component Edit2 property Text = “”.in the component Edit1 property Text = “” (empty string).in the component Label2 property Caption = “ h = “.in the component Label1 property Caption = “ S = “.With the help of Object Inspector we need to set such properties of components: Placing components on the main formĪs a result the objects (variables) are created with such names: Label1, Label2, Edit1, Edit2, Button1. We place components as shown in Figure 2.įig. Property “Name” of main form of applicationįrom tab Standard you need to place on the form such components (Fig. In Object Inspector you can change the form’s name with the help of property Name (Fig. Developing the main form of application.Īt present, we have the main form of application named “ Form1“.The project name leave as “ Project1.cbproj“. The name of module of main form leave as is – “ Unit1.cpp“.

ProgressĬreate the new project as “ VCL Form Application“. To get the window of result we need create a new form. The result must be outputted as a separate window. Where V– volume of the prism, S 0 – area of basis., h– the length of prism height. The formula of volume of prism is following: An example of creating and calling a new form from main form of application in C++ Builderĭevelop the application, that calculates a volume of a prism.
