473,507 Members | 2,389 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 2284
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_GetHeader.

The two WM_NOTIFYs which you might want to intercept are
first HDN_ENDTRACK and second HDN_ITEM_CHANGED (that's the NMHDR code).
ListView_GetColumnWidth after HDN_ENDTRACK returns the old column-width;
ListView_GetColumnWidth 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_nospam.com> wrote in message
news:Od**************@TK2MSFTNGP10.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_GetHeader.

The two WM_NOTIFYs which you might want to intercept are
first HDN_ENDTRACK and second HDN_ITEM_CHANGED (that's the NMHDR code).
ListView_GetColumnWidth after HDN_ENDTRACK returns the old column-width;
ListView_GetColumnWidth 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
3305
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...
0
4481
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...
4
1770
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...
18
1500
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...
7
1388
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
6072
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...
1
3348
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...
1
100364
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...
1
2525
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...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
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...
0
7485
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...
0
5623
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,...
1
5042
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...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
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 ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.