tags:

views:

113

answers:

1

I've installed the latest VB6 patches and I'm trying to set up a listview to allow column reordering. I've tried both setting the property AllowColumnReorder to True in the visual editor, as well as calling AllowColumnReorder=true in the form load procedure.

Yet, I still cannot move the columns when running the application.

Would there be any other things that I should be looking for? There is no place in the code that explicitly turns off this feature.

Thanks!

A: 

Tim,

You need to use the User32 API:

Declare Auto Function SendMessage Lib "user32" _
  (ByVal hwnd As IntPtr, _
   ByVal Msg As Integer, _
   ByVal wParam As Integer, _
   ByVal lParam() As Integer) As Integer

---
Dim colArray(colCount - 1) As Integer
SendMessage(ListView1.Handle, LVM_GETCOLUMNORDERARRAY, colCount,
colArray)

Regards,

Mas

MaSuGaNa