Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Get $125 within 24 hours
Enter your email address:
Enter the security code shown:

Removing List Items from the ListView

Once we've added ListItems to the ListView, the next logical step to look at is removing them. Not surprisingly, removing a ListItem is a simple task, achieved by calling the Remove method of the ListItems collection.
Again, since we'll also be removing items with API calls, timing the removal will help quantitatively compare the two methods. Listing 4 shows the Click event handler for cmdCOMDelete.


Private Sub cmdCOMDelete_Click()

Dim lTime As Long

' get current tick count
lTime = GetTickCount

' delete the selected item with object model calls
lvwMain.SetFocus
lvwMain.ListItems.Remove
lvwMain.SelectedItem.Index

' determine ET and display it
lblET.Caption = CStr(GetTickCount - lTime)

End Sub


There is a lot more functionality exposed by the ListView COM object's methods and properties, but they are, for the most part, pretty intuitive and easy to get a handle on. Use the Object Browser (press F2 in the eVB IDE) to explore the rest of the object model and play around to familiarize yourself with the control's capabilities.

JOBGOLDS

Related Link :

1. AFILIATE

2. Browsing dibayar $ Dollar $
a.
ClixSense
b. Bux.to

3. Note book driver acer :
a. TravelMate
b. Extensa
c. Aspire
d. Acer Note
e. Nouvo