Exercising tasks
Figure 31: Smiley face
Figure 32: Centred circles
- Create a new project. Insert a button into the Form to print a text "Hello. Welcome!" into graphic area. Rename this button to "Greeting".
- Insert a second button to delete the graphic area with white colour and name this button "Delete".
- Used the Label component to paste into the Form a question "How are you?" and create it appropriately responses that are displayed using the buttons (e. g. Fine, Not good, etc.). In the Button1.Click procedure (let´s suppose it is a positive answer) insert also commands to display a smiley face (Figure 31) after pressing the button using graphical commands you have learned so far.
- Use the Ellipse command to draw five centred circles (Figure 32).
- Use the MoveTo and LineTo commands to draw three triangles. Each of them will be different colour and will have a different line style.
- Insert a button in the Form to close the running program. Name it "Quit".