Solved

Missing event for TreeView...Need suggestions!

Posted on 2000-03-08
6
150 Views
Last Modified: 2010-05-02
I need an event when resizing columns in the TreeView control. Suggestions?
0
Comment
Question by:Olli083097
6 Comments
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2596316
<resizing columns in the treeview control>

Are you sure you're talking about resizing columns in a treeview? Don't you mean:
A) resizing the treeview
-or-
B) resizing columns in the listview
0
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2596420
Oh, and..

A) not an option (there is no way for a user to resize the treeview)

B) the listview hasn't got events to tell you that a resize happened, or that it's going on. If you really, really need to know this there's a nasty way of determining it by for instance using a timer with a short interval that checks the columnheaders width property or something like that. But you should be really desperate of getting that info (your life or job is at stake or something like that) before you should even consider that as an option.
0
 
LVL 6

Expert Comment

by:andyclap
ID: 2598621
You could hook the message WM_NOTIFY, and look for a code of HDN_ENDTRACK in the NMHDR structure.
Just guessing here, check out what messages are being sent using spy.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Accepted Solution

by:
wsh2 earned 100 total points
ID: 2599126
Yes.. andyclap is correct.. this definitely can be done through subclassing the Listview header. Check this out.. you will find MANY Listview API solutions with code.. in the Common Controls / Listview section.

http://www.mvps.org/vbnet/

Once there, keep an eye out for the one entitled.. "Subclassing and Responding to Notifications from the ListView Header".. in as you will find your solution there.. <smile>.

0
 

Author Comment

by:Olli083097
ID: 2599644
All:
I'm sorry, I really meant ListView(I wrote the question after a long day's work...).

wsh2:
Thanx! Exactly what I needed!!! Thanx!

BTW: I liked the page, "VBnet"
0
 

Author Comment

by:Olli083097
ID: 2599647
ARG! Forgot to accept your answer... Thanx, again!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now