Two treeview control & scrolling (Urgent If Possible) RRS feed

  • Question


    I have two treeview in which i am done with loading data.

    I have Left treeview & right treeview

    When user click any of the node either side, opp. side treeview also should be selected at same time.


    I am done with that. Now problem is with scrolling.

    When user scroll any of treeview & opp. side also scroll with that. I have done that also but problem is that i am not getting scroll event. & because of that i have done like, on mouse over event of treeview written following code.


    For i2 As Integer = IIf(i < i1, i, i1) To IIf(i < i1, i1, i) - minus

    SendMessage(DestinationTreeView.Handle, 277&, IIf(Direction = -120, 1&, 0&), vbNull)



    Private Declare Function SendMessage _

    Lib "user32" _

    Alias "SendMessageA" _

    (ByVal hwnd As IntPtr, _

    ByVal wMsg As Integer, _

    ByVal wParam As Integer, _

    ByVal lParam As Integer) _

    As Integer


    But i want something like, when user scroll any treeview at same time it will scroll the other treeview control.


    It will be great if someone solve this. This is very critical to my application as above loop takes more time when data in treeview control are more.


    Thanks in advance

    Saturday, April 19, 2008 9:03 PM