Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

(Page 1 of 2) 49 Result(s) found 

 

Determine the number of visible items in a ListView control
Total Hit (4393) Microsoft "forgot" to provide the ListView control with the GetVisibleCount property, as it did, for example, with the TreeView control. However, getting this information is as easy as sending a message to the control: «Code LangId=1» Private Const LVM_FIRST = &H1000 Private Const LVM_GETCOUNT ....Read More
Rating
Determine the optimal width for ListView columns
Total Hit (2963) Here's a simple but effective trick to ensure that the column of a ListView control is wide enough to display the entire string you're assigning to the column title or to an element. Just drop a Label on the form, set its Autosize property to True and Visible property to False. Also, ensure that the ....Read More
Rating
Get full control on the text typed in a ListView's item
Total Hit (3427) The ListView control exposes the AfterLabelEdit event to let the programmer validate the text entered in a ListItem, but there is no way to trap keys as they are typed by the user. This prevents you from discarding unwanted characters while the user types them. You can work around this problem by ....Read More
Rating
Limit the length of an item in a ListView control
Total Hit (3721) The ListView control doesn't expose any property that lets you limit the amount of text users can type when editing an item's label. However, you can do the trick with a couple of SendMessage API calls from within the BeforeLabelEdit event: with the LVM_GETEDITCONTROL message you retrieve the handle ....Read More
Rating
Prevent dragging elements in a ListView control
Total Hit (3107) The ListView control doesn't expose any property that lets you disable the dragging of its elements. To do so, you must trap the WM_NOTIFY message that the ListView control sends its parent form when the drag operation begins, and "eat" it. Using the MSGHOOK.DLL subclassing library it's easy to acco ....Read More
Rating
Selecting an entire row in a ListView
Total Hit (3641) The ListView control that comes with VB6 lets you select an entire row by setting its FullRowSelect property to True. If you are working with VB5 or you're using VB6 with the old version of the Microsoft Windows Controls this capability isn't avaible, but if you have installed the comctl32.dll versi ....Read More
Rating
Setting the width of the last column of a ListView when the control is resized
Total Hit (2389) When you resize a ListView control (this happens automatically if the ListView is docked to the form, and the user resizes the form), it's nice to have the last column to be resized accordingly to cover the available space. To do this, handle the ListView's Resize control (in .NET any control has a ....Read More
Rating
ListBoxItemFromPoint - The index of a ListBox item at given coordinates
Total Hit (3177) «Code LangId=1» 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 Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _ Any, dest As Any, ByVal num ....Read More
Rating
ListViewAdjustColumnWidth - Resize ListView's columns to account for their contents
Total Hit (3357) «Code LangId=1»Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Const LVM_SETCOLUMNWIDTH = &H1000 + 30 Const LVSCW_AUTOSIZE = -1 Const LVSCW_AUTOSIZE_USEHEADER = -2 ' Adju ....Read More
Rating
ListViewScroll - Scroll a ListView control horizontally or vertically
Total Hit (4366) «Code LangId=1» 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 Const LVM_FIRST = &H1000 Const LVM_SCROLL = (LVM_FIRST + 20) ' Scroll the contents of a ListView control ho ....Read More
Rating
ListViewVisibleItems - The number of visible elements in a ListView control
Total Hit (2970)
Rating
How to get a listview control to SORT DATES correctly
Total Hit (2391)
Rating
How to get a listview control to sort numbers correctly...
Total Hit (2344) This is one I discovered after banging my head against the wall for a few hours trying to get a list view control to sort numbers correctly. When trying to create a list view control in report mode that would allow a user to quickly sort by a text listing (in this case a column of state abbreviation ....Read More
Rating
How to sort items on the fly as they are added in a ListView using SubClassing
Total Hit (3559) «Code LangId=1»Option Explicit ' The NMHDR structure contains information about a notification message. The pointer ' to this structure is specified as the lParam member of the WM_NOTIFY message. Private Type NMHDR hwndFrom As Long ' Window handle of control sending message idFrom As ....Read More
Rating
This is a link to a different site Presenting a Non-Selectable 'No Data' Picture in a ListBox
Total Hit (1588) The VBnet page Customizing the ListView's Appearance via API showed how to use SendMessage with the LVBKIMAGE structure to display images in the data window of a listview control. Although Windows' normal list box does not support such functionality, we can still fake this functionality using the B ....Read More
Rating
This is a link to a different site Sorting ListView ListItems Using Callbacks
Total Hit (1401) Sorting numeric values with the ListView control's built-in sort mechanism has always left much to be desired. Because the ListView stores the item and SubItem data as strings, the default sorting algorithm sorted numbers in string format. This meant that instead of a sort of 1, 2, 3, 20, 35, the Li ....Read More
Rating
This is a link to a different site Substituting a ListView for a Combo's Dropdown List
Total Hit (1038) Once the methods to trap the display of a combo's default dropdown list had been coded, substituting another control in place of the dropdown list is as easy as modifying the basic routine to point to the new control. Based on the code listed above, the only changes needed to support a listview cont ....Read More
Rating
This is a link to a different site Subclassing and Responding to Notifications from the ListView Header
Total Hit (941) Here is a means to track the activity when a user is interacting with a ListView control's ColumnHeaders.
Rating
This is a link to a different site Definitions of the ListView API Members
Total Hit (1004) This method is intended for Visual Basic 5 or Visual Basic 6 where the Common Control library used is the MSComCtl 5 version (comctl32.ocx). Because the VB6-specific mscomctl.ocx (Common Controls 6) is a complete implementation of comctl32.dll and not reliant on the version of comctl32.dll installed ....Read More
Rating
This is a link to a different site ListView Demo 1 - Obtaining the File Path
Total Hit (971) This page details the code required to construct the base form, and the code necessary to retrieve the user's selection using the Windows Browse dialog. When the demo is completed, the final app will retrieve the users selection and populate the listview with selected files from that folder, comp ....Read More
Rating
This is a link to a different site ListView Demo 2 - Populating the ListView
Total Hit (1591) This page details the code required to populate the listview control with files matching the selected file spec using the APIs FindFirstFile, FindNextFile and the WIN32_FIND_DATA type. When the demo is completed, the final app will retrieve the users selection and populate the listview with selec ....Read More
Rating
This is a link to a different site ListView Demo 3 - Adding Sorting Functionality
Total Hit (977) This page adds a popup menu and the routines necessary to sort and change list views. When the demo is completed, the final app will retrieve the users selection and populate the listview with selected files from that folder, complete with associated icons, file name, file type, file size and cre ....Read More
Rating
This is a link to a different site ListView Demo 4 - Adding the Associated Icons
Total Hit (1130) By far the most complicated code yet, this page adds the code necessary to retrieve the Windows associated icon for a given file, assign it to an imagelist dynamically, and use it to display with the file in the listview. Among the features of the method detailed here is the reuse of an icon if it h ....Read More
Rating
This is a link to a different site Autosizing ListView Columns via API
Total Hit (1680) The ListView control in both VB5 and VB6 implementations supports SendMessage with the LVSCW_AUTOSIZE and LVSCW_AUTOSIZE_USEHEADER messages to cause the ListView to adjust its column widths to maximize data display. This page shows how to use these messages to resize the columns to fit the longest c ....Read More
Rating
This is a link to a different site Creating a Ledger-Style Listview Report Background
Total Hit (1112) This page takes a different approach based on the Picture property of the VB5 and VB6 listviews. With this demo, picture box properties are set to match the size and font of the listview. The demo then draws two filled rectangles inside the picture box corresponding to ledger colours specified, and, ....Read More
Rating
This is a link to a different site Customizing the ListView's Appearance via API
Total Hit (1564) Once again, the SendMessage API, in conjunction with the new extended style flags for the ListView control, provides a means to customize the appearance of the listview common control in a Visual Basic application. By combining the new LVBKIMAGE structure (Type), and specifying the LVBKIF_SOURCE_U ....Read More
Rating
This is a link to a different site Detecting ListView SubItem Clicks in Normal And FullRowSelect Mode
Total Hit (1039) This page demonstrates using the LVHITTESTINFO type along with the LVM_SUBITEMHITTEST message to determine where on the control the mouse was clicked, regardless of the view mode or whether the FullRowSelect feature has been enabled (Label1). The code is provided in the MouseDown event to both take ....Read More
Rating
This is a link to a different site Determining a ListView's Visible Item Count
Total Hit (1618) This shows a quick call you can add to any ListView code to determine the number of currently-visible ListItems in the control when in Report mode. By calling SendMessage with the LVM_GETCOUNTPERPAGE message, the call returns the number of items that can be completely contained in the visible area o ....Read More
Rating
This is a link to a different site Highlighting a Listview Report Column
Total Hit (1486) Just as the picture property was used in Creating a Ledger-Style Listview Report Background to simulate a ledger-style background for the listview, this code provides a means to highlight the data in a specific column in the control using the same technique. To do this, the the default background c ....Read More
Rating
This is a link to a different site Highlighting and Maintaining a Listview Report Column through Subclassing
Total Hit (1062) This is a modification of the code at to add subclassing of the listview control to allow tracking of ColumnHeader adjustments to maintain the correct column width as the columns are resized. For a complete description of the techniques used, see the related links above. ....Read More
Rating


(Page 1 of 2) 49 Result(s) found  1 2

Recommanded Links

 

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.