Programming Visual Basic 2008 phần 4

DỰ ÁN ACCESS Nạp dự án luật Chương 5 (trước), hoặc thông qua các mẫu dự án mới hoặc bằng cách truy cập các dự án trực tiếp từ thư mục cài đặt. Để xem các mã trong hình thức cuối cùng của nó, tải Chương 5 (Sau) Mã thay tiêu của chúng tôi là một hình thức thú vị truyền tải thông tin cơ bản về chương trình | Figure 7-12. The basic look of the main form The TaskLibraryltem procedure adjusts the various panels and fields on the display so that the user sees those fields needed to look up library items. Private Sub TaskLibraryItem ------- Update the display. AllPanelsInvisible True New _ ActSearch End Sub The AllPanelsInvisible routine also does some on-screen adjustment. I like to have the existing text in a TextBox field selected when it becomes the active control. Each text control includes a SelectAll method that accomplishes this feat. We ll call that method during each TextBox control s Enter event an event that occurs when a control receives the keyboard input focus. Private Sub SearchText_Enter ByVal sender As Object _ ByVal e As Handles ------- Highlight the entire text. End Sub 216 Chapter Windows Forms Using the mouse to access the different features of the form is good but I m a keyboard person. To deal with keyboard users like me the code adds support for feature access using the F2 through F9 keys. Private Sub MainForm_KeyDown ByVal sender As Object _ ByVal e As _ Handles ---- The keys F2 through F9 access the different sections of the form. Select Case Case TaskLibraryItem True Case TaskPatronRecord True Case ---- Allow form to handle Alt F4. If True Then Else TaskHelp End If True Case TaskCheckOut True Case TaskCheckIn True Case TaskAdmin True Case TaskProcess True Case TaskReports True End Select End Sub As each keystroke comes into the KeyDown event handler the Select Case statement examines it. When a matching Case .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
2    537    2    19-05-2024
182    219    1    19-05-2024
36    79    1    19-05-2024
84    197    1    19-05-2024
11    433    1    19-05-2024
Đã 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.