Create the GUI for the calculator as shown in Fig. 2.42.
* **__Manipulating the Forms properties__**. Change the `Text` property of the Form to Calculator. Change the `Font` property to 9pt Segoe UI. Change the `Size` property of the Form to 258, 210.* **__Adding a TextBox to the Form__**. Set the TextBoxs `Text` property in the Properties window to 0. Stretch the TextBox and position it as shown in Fig. 2.42. Set the `TextAlign` property to Rightthis right aligns text displayed in the TextBox.* **__Adding the first Panel to the Form__**. Panel controls are used to group other controls. Add a Panel to the Form. Change the Panels `BorderStyle` property to Fixed3D to make the inside of the Panel appear recessed. Change the `Size` property to 90, 120. This Panel will contain the calculators numeric keys.* **__Adding the second Panel to the Form__**. Change the Panels `BorderStyle` property to Fixed3D. Change the `Size` property to 62, 120. This Panel will contain the calculators operator keys.* **__Adding the third (and last) Panel to the Form__**. Change the Panels `BorderStyle` property to Fixed3D. Change the `Size` property to 54, 62. This Panel contains the calculators `C` (clear) and `C/A` (clear all) keys.* **__Adding Buttons to the Form__**. There are 20 Buttons on the calculator. Add a Button to the Panel by dragging and dropping it on the Panel. Change the `Text` property of each Button to the calculator key it represents. The value you enter in the `Text` property will appear on the face of the Button. Finally, resize the Buttons, using their `Size` properties. Each Button labeled `09`, `*`, `/`, `-`, `=` and `.` should have a size of 23, 23. The `00` Button has size 52, 23. The `OFF` Button has size 54, 23. The `+` Button is sized 23, 81. The `C` (clear) and `C/A` (clear all) Buttons are sized 44, 23.
Reviews
There are no reviews yet.