วันอังคารที่ 2 กรกฎาคม พ.ศ. 2556

Visual Basic 6.0 : Exercise




Visual Basic 6.0 : Exercise 

แบบฝึกหัด วิชวลเบสิก 6.0


source :          http://occupatech.blogspot.com


Exercise 1

Calendar/Time Display

1 Design a window application that displays the current month, day, and year.  Also, display the current time, updating it every second (look into the Timer control).  Make the window look something like a calendar page.  Play with object properties to make it pretty.

ให้นักเรียนออกแบบหน้าต่างแอ็ปปลิเคชัน ที่แสดงเดือนปัจจุบัน วันที่ และปี  และยังแสดงเวลา ณ ปัจจุบัน ที่จะอัปเดตทุกวิยาทีอีกด้วย (เหมือนกับนาฬิกาจับเวลา)  หน้าต่างแอ็ปปลิเคชันนี้จะคล้ายเหมือนใบปฏิทิน  และให้นักเรียนตกแต่งอ็อบเจ็กต์ต่างๆ ให้ดูดี




2 Configure the properties of the related objects like the followings.
 ทำการตั้งค่าต่างๆ ให้กับอ็อบเจ็กต์ที่เกี่ยวข้อง เหมือนค่าที่กำหนดมาให้ตามนี้

Configuration 1





Configuration2



Configuration3



3  Attach the source codes to the objects. There is only the Timer "timDisplay" object that we have to attach our source codes to.  Although there is no any variable declared, but we have to type the code "Option Explicit" at the General Declarations module.
 ทำการผูกซอร์สโค้ด (รหัสโปรแกรม) เข้ากับอ็อบเจ็กต์  สำหรับงานนี้จะมีเพียงอ็อบเจ็กต์ไทเมอร์ ที่ชื่อ timDisplay เท่านั้น ที่เราจะต้องใส่โค้ดผูกไว้

Source codes that we have to type.












ไม่มีความคิดเห็น:

แสดงความคิดเห็น