J
jason.yfho
Hi all,
I want to have less white spacing in the listview of my Compact
Framework application. I tried to set it using SendMessage, but there
is no change to the listview. Any idea? Below is my code. Thank you so
much!!
Public Const LVM_FIRST = &H1000
Public Const LVM_SETICONSPACING = (&H1000 + 53)
<DllImport("coredll", SetLastError:=True)> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As
_
UInt32, ByVal wParam As UInt32, ByVal lParam As Integer) As IntPtr
End Function
Private Function MakeLong(ByVal nLoWord As Int16, ByVal nHiWord As
Int16) As Int32
'places two integer values into the hiword and loword
MakeLong = nHiWord * &H10000 + nLoWord
End Function
Private Sub ListViewIconSpacingInit()
SendMessage(ListView1.Handle, LVM_SETICONSPACING, 0, MakeLong(130,
114))
End Sub
Rgds,
Jason
I want to have less white spacing in the listview of my Compact
Framework application. I tried to set it using SendMessage, but there
is no change to the listview. Any idea? Below is my code. Thank you so
much!!
Public Const LVM_FIRST = &H1000
Public Const LVM_SETICONSPACING = (&H1000 + 53)
<DllImport("coredll", SetLastError:=True)> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As
_
UInt32, ByVal wParam As UInt32, ByVal lParam As Integer) As IntPtr
End Function
Private Function MakeLong(ByVal nLoWord As Int16, ByVal nHiWord As
Int16) As Int32
'places two integer values into the hiword and loword
MakeLong = nHiWord * &H10000 + nLoWord
End Function
Private Sub ListViewIconSpacingInit()
SendMessage(ListView1.Handle, LVM_SETICONSPACING, 0, MakeLong(130,
114))
End Sub
Rgds,
Jason