tailieunhanh - Tự học Visual Basic và bài tập thực hành part 5

Tham khảo tài liệu 'tự học visual basic và bài tập thực hành part 5', 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ả | Ehd It End Sub Private Sub cmdUp_Click On Error Resume Next Dim nltem As Integer With Istitems If .Listindex 0 Then Exit Sub nltem - .Listindex If nltem 0 Then Exit Sub can t move 1st item up move item up .Additem .Text nltem - 1 remove old item .Removeitem nltem 1 select the item that was just moved .Selected nltem - 1 True End With End Sub Private Sub cmdDown_Click On Error Resume Next Dim nltem As Integer With Istltems If .Listindex 0 Then Exit Sub nltem .Listindex If nltem .ListCount - 1 Then Exit Sub can t move last item down move item down .Additem .Text nltem 2 remove old item .Removeitem nltem select the item that was just moved .Selected nltem 1 True 95 End With End Sub Private Sub lstltems_DragDrop Source As Control X As Single Y As Single Dim i As Integer Dim nID As Integer Dim sTmp As string If Istltems Then Exit Sub If Istltems Listcount 0 Then Exit Sub With Istltems i - Y TextHeight A .TopIndex If i .Listindex Then dropped on top of itself Exit Sub End If If i .ListCount - 1 Then i .Listcount - 1 nID - .Listindex sTmp - .Text If nID -1 Then sTmp -Text .Removeitem nID .Additem sTmp i .Listindex .Newlndex End If End With SetListButtons End Sub Sub lstltems_MouseMove Button As Integer Shift As Integer X As Single Y As Single If Button vbLeftButton Then End Sub 96 Private Sub lstltems_Click SetListButtons End Sub Sub SetListButtonsO Dim i As Integer i Istltems. Listindex set the state of the move buttons i 0 i -1 And i - 1 i -1 End Sub Sau khi gỡ rối và để điều hoạt ấn phím F5. Trong khung cửa sổ điều hoạt kích nút lệnh Add và màn hình sẽ hiện khung thoại yêu cầu cho biết tên đối tượng muôn thêm. Sau khi nhập tên đối tượng và kích OK tên đốì tượng sẽ được thêm vào khung danh sách. Nếu muốn xóa kích chọn tên đối tượng trong khung danh éách và kích nút lệnh Delete. Bạn có thể thay đổi mã chương trình theo nhu cầu tác vụ. Bài 9 Thiết kế khung chuyển danh sách .

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.