web development India freelance website designer
' Constants / Declarations - Change Public / Private as required
'
Public Const TV_FIRST As Long = &H1100
Public Const TVM_GETNEXTITEM As Long = (TV_FIRST + 10)
Public Const TVM_DELETEITEM As Long = (TV_FIRST + 1)
Public Const TVGN_ROOT As Long = &H0
Public Const WM_SETREDRAW As Long = &HB
'

Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
'
' Very fast Clearing of treeview control - Place this where required
'

Private Sub ClearTreeView(ByVal tvHwnd As Long)
'
Dim lNodeHandle As Long
'
' Turn off redrawing on the Treeview for more speed improvements
'
SendMessageLong tvHwnd, WM_SETREDRAW, False, 0

Do
lNodeHandle = SendMessageLong (tvHwnd, TVM_GETNEXTITEM, TVGN_ROOT, 0)
If lNodeHandle > 0 Then
SendMessageLong tvHwnd, TVM_DELETEITEM, 0, lNodeHandle
Else
Exit Do
End If
Loop

SendMessageLong tvHwnd, WM_SETREDRAW, True, 0
End Sub
Fast Clearing

1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593

Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design