1 / 34

Lesson 10

Lesson 10. Developing a Simple Programme. At the end of this lesson, students should be able to:. Create object using toolbox: Textbox, Picturebox Declare Variables: String, Integer, Double Write codes Test and Debug Compile the program.

drandell
Télécharger la présentation

Lesson 10

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 10 Developing a Simple Programme

  2. At the end of this lesson, students should be able to: • Create object using toolbox: Textbox, Picturebox • Declare Variables: String, Integer, Double • Write codes • Test and Debug • Compile the program

  3. Click ToolBox at the left side of the screen and all the control will be displayed. Toolbox Figure 1

  4. 2. Click ‘TextBox’ control . Textbox Figure 2

  5. 3. Drop onto the Form1 Textbox Figure 3 4. Click and drag the Textbox to resize. Figure 4

  6. 5. Create another three ‘TextBox’. Four Text Boxes Figure 5

  7. 6. Click Label on the ToolBox Label Figure 6

  8. 7. Drop onto the Form1 Label Figure 7

  9. 8. Set properties of the form. Rename Text : Form1 to MyBiodata Figure 8 Rename Form1

  10. Your Form Properties should be like this MyBiodata Figure 9

  11. 9. Set properties of the form. Rename Name : Form1 to frmBiodata frmBiodata Figure 10

  12. 10. Click Label1 Label1 Figure 11

  13. 11. Rename Text : Label1 to Name Label1 Figure 12

  14. Your Text Properties must be like figure shown below. Name Figure 13

  15. Result after rename Label1 to Name. Label Name Figure 14

  16. 12. Set properties of the Label2,Label3 and Label4 as shown below. Table 1

  17. 13. Click Textbox1 Textbox1 Figure 15

  18. Rename Name :TextBox1 to txtname Figure 16

  19. 14. Set properties of the TextBox2,TextBox3 and TextBox4 as shown below. Table 2

  20. Your form should be shown as Figure 17. Figure 17

  21. 15. Click ‘PictureBox’ control . PictureBox Figure 18

  22. 16. Drop onto the “MyBiodata” form PictureBox Figure 19

  23. 17. To browse image (for PictureBox1) in Properties, click browse button Click here Figure 20

  24. 18. ‘Select Resource’ window will be displayed Figure 21

  25. 19. Click ‘Local resource’. Then click ‘Import’. Step 1 : Click Local Resource Step 2 : Click Import Figure 22

  26. 20. Now, choose image file (example : winter). Then click Open. Figure 23 Step 1:Click “Winter” Step 2:Click Open

  27. 21. Your form should now look like this Figure 24

  28. 22. Click ‘Button’ control on the Toolbox Button Figure 25

  29. 23. Drop onto the “MyBiodata” form Button1 Figure 26 Button1

  30. 24. Set properties of the button1 Button1Name btnExitText Exit Exit Figure 27

  31. 25. Double click button “Exit” Figure 28 Double click here

  32. 26. Type the coding as below: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit. Click Application.Exit() End Sub Figure 29

  33. 27. Next, set properties of the form : Table 3

  34. 28. To debug program, click Debug >> Start Debugging on menu bar. 29. To Run (start) program, click (F5) and window will be displayed. Now your window should look like this. 30. Press ‘Exit button’ to close your application. Figure 30

More Related