1 / 15

Week 3

Week 3. Delphi7. การเขียนโปรแกรมด้วย Delphi7.

milica
Télécharger la présentation

Week 3

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. Week 3 Delphi7

  2. การเขียนโปรแกรมด้วย Delphi7 สำหรับการเขียนโปรแกรมกับ Delphi7 นั้นจะใช้แนวการเขียนแบบ Even Drive ซึ่งเป็นการเขียนโปรแกรมในลักษณะที่ว่าเมื่อมีเหตุการณ์อย่างหนึ่งเกิดขึ้นกับตัวโปรแกรม เราจะมีวิธีการจัดการกับเหตุการณ์นั้น ด้วยการเขียนคำสั่งต่าง ๆ เพื่อรองรับเหตุการณ์ต่าง ๆ ที่จะเกิดขึ้นได้ย่างรวดเร็ว

  3. รู้จักรกับ Object Label ใช้แสดงข้อความ Edit ใช้แสดงข้อความบรรทัดเดียว ผู้ใช้สามารถแก้ไขข้อความได้ Menoใช้แสดงข้อความหลายบรรทัด ผู้ใช้สามารถแก้ไขข้อความได้

  4. Button ใช้สร้างปุ่ม Checkbox ใช้แสดงตัวเลือกแบบเลือกได้หลายตัวเลือก Radio Button ใช้แสดงตัวเลือกแบบเลือกได้ตัวเลือกเดียว

  5. List Box ใช้แสดงข้อมูลที่เป็นแบบรายการให้เลือก Combo Box ใช้แสดงข้อมูลที่เป็นแบบรายการให้เลือก โดยสามารถแก้ไขข้อมูลได้ Score Bar ใช้แสดงช่วงการเพิ่มขึ้นหรือลด

  6. Group Box ใช้สำหรับแบ่งกลุ่ม คอมโพแนนต์ที่อยู่บนฟอร์ม Radio Group ใช้สร้าง Radio Button ที่อยู่ใน Group Panel ใช้จัดกลุ่มคอมโพแนนต์

  7. โปรแกรมแสดงโปสเตอร์ภาพยนตร์โปรแกรมแสดงโปสเตอร์ภาพยนตร์ • สร้าง Folder ในไดร์ฟ D ชื่อ Delphi ขึ้นมา 1 Folder • เตรียมรูปภาพโปสเตอร์ภาพยนตร์ที่เป็น Bitmap(.bmp) 3 เรื่อง ใส่ไว้ใน Folder Delphi ที่สร้างขึ้นในข้อ 1 • Spiderman • The Matrix • Vampire Twilight

  8. จัดวางคอมโพแนนต์

  9. กำหนด Property

  10. กำหนด Property

  11. เขียนโค้ดโปรแกรม

  12. เขียนโค้ดโปรแกรม พิมพ์โค้ดเพิ่มเข้าไปดังนี้ imgMovie.Picture.Bitmap.LoadFromFile('D:\Delphi\Spiderman');

  13. ทำเช่นเดียวกันกับ Radio Button อีกสองตัว แต่เปลี่ยนโค้ดดังนี้

  14. เขียนโค้ดโปรแกรม

  15. เขียนโค้ดโปรแกรม

More Related