Public Shared Function ListViewGetColumnOrder(ByVal lvw As
ListView) As Integer()
Dim len As Integer = lvw.Columns.Count
Dim inta As Integer() = New Integer(len - 1) {}
SendMessage(lvw.Handle, LVM_GETCOLUMNORDERARRAY, len, inta)
Return inta
End Function
Public Const LVM_FIRST As Integer = &H1000
Public Const LVM_GETCOLUMNORDERARRAY As Integer = (LVM_FIRST + 59)
Public Declare Auto Function SendMessage Lib "User32" ( _
ByVal hWnd As IntPtr, _
ByVal msg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer()) As Boolean
HTH,
Sam
On Wed, 29 Dec 2004 18:29:55 -0000, "S Shulman"
<sm*******@hotmail.com> wrote:
Hi all
I need to know the actual order of the items in the listview control even
after the user clicked the column header to re-arrange the order
Thank you,
Shmuel