TAILIEUCHUNG - Manning Windows Forms Programming (phần 14)

Tham khảo tài liệu 'manning windows forms programming (phần 14)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Implement the slide show behavior continued Action Result 6 Add a Paint event handler for the PictureBox control to do the following a. If the current position is out of range simply return. b. Load the current Photograph. c. Display the caption in the title bar. d. Preserve the aspect ratio when drawing the image into the window. private void pboxSlide_Paint object sender e if _albumPos return Photograph photo _album _albumPos if photo null 0 1 2 _albumPos 1 else 7 Add a Tick event handler for the slideTimer component. How-to This is the default event for this component so simply double-click the timer in the component tray. private void slideTimer_Tick object sender e 8 In this handler increment the current album position. _albumPos 9 If the position is passed the end of the album reset the slide show as follows a. Modify the Stop button text to be Start. b. Reset the track bar value to zero. c. Invalidate the picture box to draw the initial photograph. d. Disable the timer. if _albumPos Start _albumPos 0 0 false 10 If the position is at the end of the album set the title bar to indicate the slide show is finished. else if albumPos Finished 11 Otherwise for a valid album index a. Invalidate the picture box to draw the next image. b. Set the track bar value to the current position. else albumPos 12 Reassign the interval value to pick up any changes made by the user. Reset the interval SetInterval 616 CHAPTER 18 Odds and ends .NET Implement the slide show behavior continued Action Result 13 Add a Click event handler for the Close button to close the form. private void btnClose_Click object sender .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.