tailieunhanh - Beginning Microsoft Visual Basic 2008 phần 5

Thêm đoạn mã sau để tạo ra các phương pháp ClearEditBox: 'Xóa kiểm soát txtEdit Public Sub ClearEditBox ()' Thiết lập tài sản EditText EditText = 'Thiết lập lại màu chữ = ' Thiết lập thanh trạng thái văn bản StatusText = "Text box xóa" End Sub | Chapter 10 Debugging and Error Handling 12. Add the following two properties to the end of the Computer class Public Readonly Property FreeMemory As String Get Using the My namespace Return Format _ 1024 _ 0 K End Get End Property Public Readonly Property TotalMemory As String Get Using the My namespace Return Format _ 1024 _ 0 K End Get End Property 13. Switch to the code for the Debug form and add the following highlighted Imports statement Imports Public Class Debug 14. You need to add a few private variable declarations next. Add the following code Public Class Debug Using the Generics class Private objStringValues As New Generics Of String Private objIntegerValues As New Generics Of Integer Using the List T class Private objCustomerList As New List Of Customer 15. Add the following ListCustomer procedure to add customers to the list box on your form Private Sub ListCustomer ByVal customerToList As Customer _ - End Sub 16. Next you need to add the rest of the code to the Start button Click event handler. Select btnStart in the Class Name combo box at the top of the Code Editor and then select the Click event in the Method Name combo box. Add the following highlighted code to the Click event handler Private Sub btnStart_Click ByVal sender As Object _ ByVal e As Handles 335 Chapter 10 Debugging and Error Handling Declare variables Dim strData As String String variable data If 0 Then strData End If Add an empty string to the ListBox Demonstrates the use of the List T class Customers in the Customer Class New Customer 1001 Henry For New Customer 1002 Orville Wright For Each objCustomer As Customer In .

crossorigin="anonymous">
Đã 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.