VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

ListView Icon Spacing

The typist  (1 Submission)   Windows API Call/Explanation   Intermediate   Wed 3rd February 2021

This is a demo which shows how to control the icon spacing in a listview's icon view. The demo is an easy to use wrapper around the LVM_SETICONSPACING api message. You only need to submit the x, y icon spacing in twips and then the code does the rest of it.

API Declarations
Option Explicit
'
' Listview api messages.
Private Const LVM_FIRST As Long = &H1000
Private Const LVM_SETICONSPACING = LVM_FIRST + 53
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Rate ListView Icon Spacing (3(3 Vote))

Download ListView Icon Spacing

ListView Icon Spacing Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters