473,780 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView events for column resizing?

Does the VB Listview have some sort of event which fires when the user
resizes the columns in Details view? I want to record the column sizes as
the user changes them. If not, can I create an event like this?

--
|
+-- Thief_
|
Nov 21 '05 #1
2 2309
Yes, it sends several WM_NOTIFY to the parent window.
The hwndFrom of the NMHDR is the header window of the
listview, which you can get from ListView_GetHea der.

The two WM_NOTIFYs which you might want to intercept are
first HDN_ENDTRACK and second HDN_ITEM_CHANGE D (that's the NMHDR code).
ListView_GetCol umnWidth after HDN_ENDTRACK returns the old column-width;
ListView_GetCol umnWidth after HDN_ITEMCHANGED returns the new column-width.
Does the VB Listview have some sort of event which fires when the user
resizes the columns in Details view? I want to record the column sizes as
the user changes them. If not, can I create an event like this?
--

|
+-- Thief_
|


User submitted from AEWNET (http://www.aewnet.com/)
Nov 21 '05 #2
So which API do I need to look at- is there sample code I can study?

--
|
+-- Julian
|
"Guest" <Guest@aew_nosp am.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.phx.gbl...
Yes, it sends several WM_NOTIFY to the parent window.
The hwndFrom of the NMHDR is the header window of the
listview, which you can get from ListView_GetHea der.

The two WM_NOTIFYs which you might want to intercept are
first HDN_ENDTRACK and second HDN_ITEM_CHANGE D (that's the NMHDR code).
ListView_GetCol umnWidth after HDN_ENDTRACK returns the old column-width;
ListView_GetCol umnWidth after HDN_ITEMCHANGED returns the new
column-width.
Does the VB Listview have some sort of event which fires when the user
resizes the columns in Details view? I want to record the column sizes as
the user changes them. If not, can I create an event like this?
> --

|
+-- Thief_
|
>


User submitted from AEWNET (http://www.aewnet.com/)

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3320
by: Sean | last post by:
Hi all, I wonder if there is a way to prevent user from resizing the last column by moving the last vertical line on a ListView, meaning I don't want user to be able to move the last vertical line and change the width of the last column on a ListView. Any suggestion would be greatly appreciated. Thank you in advance.
0
4499
by: cyrille | last post by:
Hello from example from web i did a little code to avoiding columnHeader resize. this code seems to work well, but when I put a 'normal' ListView on the same Form than my overrided ListView it seems to stop working. if I'm resizing 'normal' ListView ColumnHeaders, then I can resizing ColumnHeaders of my overrided ListView. If I don't resizing 'normal' ListView ColumnHeaders, then resizing of my overrided ListView ColumnHeaders is...
4
1784
by: Hunter Kirk | last post by:
I'm having a rather tedious problem with the listview control in visual basic.net I am trying to achive two simple procedures, I thought :) 1. I have only one column populated but still there is an extra empty column listed to the right of the header. Is there no way to specify that I only want a single column. Or is there a way to hide that unpopulated extra column that I don't want.
18
1522
by: Menu Chen | last post by:
First I feel very sorry that my English is very poor.So Please Don't be boring. I have asked this question here once ,but no one could give me answer,and the problem still bothers me. I use a ListView Control in my programs.You know that we always need a scroll bar in this contorl.But All I need is the vertical scroll bar.I don't want the control display horizontal scroll bar to Users,but how to do this?
7
1404
by: gerry.brennan | last post by:
Is it possible to stop user from interacting /editing/ changing data/ changing look with a list view. Gerry.
4
6094
by: gene kelley | last post by:
I had a VB6 app that used a third party ListView control to simply display various recordsets. The control had a VirtualMode which I used for this display. Now in VB2005, I want to do the same with the native ListView to display various datasets in VirtualMode. I have a ListView with the VirtualListSize set and the appropriate columns in place which is all similar to the old VB6 app. However, the similarities end there as I can't find...
1
3362
by: Borges | last post by:
Hi folks, I've got a listview with several columns, and I'm trying to automatically resize the columns when the control gets painted. I know there are methods for this in .NET 2 but we're not using it yet, so I've gotta get it working the old-fashioned way. There's built-in functionality for this already. If the user double-clicks on a coumn divider the listview control auto resizes the column nicely. I'm just trying to do the same...
1
100448
by: MrNobody | last post by:
what's the trick in showing/hiding columns in ListView's Details view mode? I can change a columns width to 0 and it effectively makes it disappear but then you can actually resize the column to bring it back into view. Is there any way to disable resizing for just that one column? Any other way to do this?
1
2544
by: Eran.Yasso | last post by:
Hello all, This is my first time using listview. I was looking in google for a way to write to a specific column. I have 3 columns in my list view. I want to be able to write to a specific one. Also, it seems that even when i set listview to have 3 colums, there's a fourth one with no header. How can I remove it and have only 3
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.