VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ListView Icon Spacing

by The typist (1 Submission)
Category: Windows API Call/Explanation
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

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

Download ListView Icon Spacing

Download ListView Icon Spacing (35 KB)

ListView Icon Spacing Comments

No comments have been posted about ListView Icon Spacing. Why not be the first to post a comment about ListView Icon Spacing.

Post your comment

Subject:
Message:
0/1000 characters