Visual Basic Code of the Week (COTW)
Issue #71
Online Version at (paid subscribers only)
All content and source code is Copyright (c) 1999 by C&D Programming Corp. No part of this issue can be reprinted or distributed in any manner without express written permission of C&D Programming Corp.

Only one more week!! - Free Monthly Software Giveaway

This is the last week to enter! Be sure to enter at now! If you entered last month, please be sure to enter again because your entry from last month does not count towards the prize this month. The prize is development tools worth over $300.

In this Issue

We had planned on enhancing last week's issue about CD Audio, but we did not finish it in time. Instead we are introducing some API calls that enhance the way the ListView control works.

This source code is designed for VB 4.0 32-bit and up. Questions? Email us at


The basListView module contain four subroutines that allow you to easily set or reset several new features Microsoft has added to the ListView control. This control is included in the Common Controls library (located in the COMCTL32.DLL). These routines require version 4.70 or greater of this control. It is usually included with Internet Explorer 3.x or 4.x. You can also download them separately at or get some additional information at


Public Sub lvFullRowSelect(lv As ListView, bFullRowSelectOn As Boolean)
Public Sub lvGridLines(lv As ListView, bGridLinesOn As Boolean)
Public Sub lvHeaderDragDrop(lv As ListView, bHeaderDragDrop As Boolean)
Public Sub lvTrackSelect(lv As ListView, bTrackSelect As Boolean)




Sample Usage

Assumes the ListView control you are using is called lvDrives.

    lvFullRowSelect lvDrives, True
    lvGridLines lvDrives, True
    lvHeaderDragDrop lvDrives, True
    lvTrackSelect lvDrives, True

Source Code

To see the source code for this issue you must be a subscriber to Code of the Week. If you are a subscriber the source code is available at the following address:

This document is available on the web

Paid subscribers can view this issue in HTML format. There is no additional source or information in the HTML formatted document. It just looks a little better since we have included some HTML formatting. Just point your browser to link at the top of this document.

Other links

Contact Information

C&D Programming Corp.
PO Box 20128
Floral Park, NY 11002-0128
Phone or Fax: (212) 504-7945