Pouze Φφsla p°i editaci n≤du

Postup:
Deklarujte v deklaraΦnφ Φßsti formulß°e:

Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
wParam As Long, lParam As Any) As Long

Private Const TV_FIRST = &H1100
Private Const TVM_GETEDITCONTROL = TV_FIRST + 15
Private Const ES_NUMBER = &H2000

Private Sub NumbersOnly(tvw As Treeview)

    Dim lngHwnd As Long  

    lngHwnd = SendMessage(tvw.hwnd, TVM_GETEDITCONTROL, 0, 0)

    If lngHwnd <> 0 Then
        SendMessage lngHwnd, ES_NUMBER, 0, 0
    End If

End Sub

Zp∞t

Autor: The Bozena