Solved

TreeView screwed up?

Posted on 2002-07-05
10
643 Views
Last Modified: 2006-11-17
Hy
I put on a form a TreeView
on the TreeView MouseUp event, I put a Console.WriteLine("m up");

The mouseUp events seems to come up at the wrong times.
- If I click on a node, the mouseUp comes imediatly after i move the mouse (like a mouseMove).
- If I click on blank space, not on any node, the mouseUp events comes when I press the mouse button(like a mouseDown).

Could someone verify this? Is the treeview.net screwed up?
0
Comment
Question by:Azmodan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 7132073
I am unable to reproduce this.  The MouseUp event fires each time I press and release the left mouse button anywhere on the treeview.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7132077
Never mind...I am able to see this problem now.
0
 

Author Comment

by:Azmodan
ID: 7132095
not just press and release
press, move and release


so..same behaviour at your place... :(
this treeview seems worse than the one in VB6
0
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

 

Author Comment

by:Azmodan
ID: 7137597
it there a way to hook in c#?
hook.. i mean to get the windowproc for a control's handle and watch for windows system messages?
0
 

Author Comment

by:Azmodan
ID: 7139844
(i wrote to MS and thay responded that "This is a known problem with the TreeView control in version 1.0 of the .NET Framework.")

question remains.. how can I hook for windows messages? (to look for WM_PAINT or WM_LBUTTONUP)
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7140608
With regards to VB, sublcassing/hooking can be accomplished the same as it is in previous versions using Windows API.  If you just want to translate that code over to C#, I can point you to a link.  I'm not sure if .NET provides any new, simpler method for performing this task.
0
 

Author Comment

by:Azmodan
ID: 7140644
a..yes, it does. :) found it in the meantime :)

in every control there is a protected method WndProc that is the actual WindowProc for that control. So this method is called for each and every message the control receives.
U just need to inherit the control and play with the messages.
This way u can override the MouseUp event. And call it when u find the WM_LBUTTONUP event.(didn't do it yet, but it shouldn't be very hard).

The problem still remains, the Tree is screwed up and MS admited this.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7140756
Sounds like something fun to play with, thanks for the info.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9393276
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0
 

Accepted Solution

by:
SerCouWisMOD earned 0 total points
ID: 9441908
Question was closed per the recommendation

SerCouWisMOD
Community Support Moderator
0

Featured Post

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 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