By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,985 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,985 IT Pros & Developers. It's quick & easy.

List view items Order

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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


Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.