473,385 Members | 1,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What is the "Right-Click Drag" Event in the ListView control called?

I am writting a extended ListView control and I'd like to stop the
default behavior when a user right-clciks on a non-label area and then
drags causing a "marching ants" selection box to appear. First, what
event is this? And second, how do I stop it?

I've trapped the OnItemDrag and OnDragEnter events and it's not them
(OnDragEnter doesn't even fire).

In OnClick I test for right-click and simply return.

Where is this stuff?

Tom P.
Jul 18 '08 #1
2 1710
Tom,

You are probably going to have to drop down to the WndProc method
(override it, that is) and handle the windows messages that signal the
beginning of the right click (WM_RBUTTONDOWN) as well as the subsequent
messages (WM_RBUTTONUP).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tom P." <pa***********@gmail.comwrote in message
news:17**********************************@v26g2000 prm.googlegroups.com...
>I am writting a extended ListView control and I'd like to stop the
default behavior when a user right-clciks on a non-label area and then
drags causing a "marching ants" selection box to appear. First, what
event is this? And second, how do I stop it?

I've trapped the OnItemDrag and OnDragEnter events and it's not them
(OnDragEnter doesn't even fire).

In OnClick I test for right-click and simply return.

Where is this stuff?

Tom P.
Jul 19 '08 #2
That allows me to trap the series of events that cause the behavior
but I still can't stop it.

I'm trying to stop the drawing of the rubberband selection marquee.
And now that I look it's happening during left-clicks as well. My
inherited ListView is set to OwnerDraw = true but nothing I can do
will turn the selection marquee off.

Tom P.
On Jul 19, 10:03*am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Tom,

* * You are probably going to have to drop down to the WndProc method
(override it, that is) and handle the windows messages that signal the
beginning of the right click (WM_RBUTTONDOWN) as well as the subsequent
messages (WM_RBUTTONUP).

--
*- Nicholas Paldino [.NET/C# MVP]
*- m...@spam.guard.caspershouse.com

"Tom P." <padilla.he...@gmail.comwrote in message

news:17**********************************@v26g2000 prm.googlegroups.com...
I am writting a extended ListView control and I'd like to stop the
default behavior when a user right-clciks on a non-label area and then
drags causing a "marching ants" selection box to appear. First, what
event is this? And second, how do I stop it?
I've trapped the OnItemDrag and OnDragEnter events and it's not them
(OnDragEnter doesn't even fire).
In OnClick I test for right-click and simply return.
Where is this stuff?
Tom P.
Jul 23 '08 #3

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

Similar topics

0
by: pom | last post by:
What dynamnic open-source content management system(s) would you look at to meet the following specific situation? - The requirement is for a large institutional client who wishes to build a...
1
by: Paul Miller | last post by:
I came across this recipe on the Python Cookbook site: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286134 As written, it allows evaluation of either constants or more general...
3
by: Evgeny Gopengauz | last post by:
What is the way recommended by Microsoft for distributing the MSSQL database with end-user application if I don't like to use sql-scripts because I need to hide the stored procedures sources (they...
1
by: Edward King | last post by:
I have a statement in a asp,like follows£º var str=window.top.main.document.all.contenttext.value; I use IIS5.0 to deploy this asp,then I visit this asp like follows:...
6
by: Dean Slindee | last post by:
I am looking for the "right" way to handle inserting and presenting null date values. Public Const c_NullDate As Date = #12:00:00 AM# If I set the value of a date variable in an SQL Server insert...
1
by: tshad | last post by:
I have columns with text and radio buttons that I would like to center or put to the right of the cell, but the attribute ItemStyle-HorizontalAlign="right" doesn't seem to work. ...
4
by: lionheart | last post by:
Hi, I am currently trying to group my classes using namespaces. But since these groups are not really independend I end up to have a lot of forward declarations. My first approache was to...
5
by: Terry Olsen | last post by:
This is the easiest way I can think of to do this: tmp=Right("0" & Now.Month.ToString, 2) The only way I've figured to do it the .NET way is this: tmp="0" & Now.Month.ToString...
3
by: mehdi | last post by:
I have a field that is a memo and I have a report displaying the text in that memo. What I need to know is how to "justify" the text right to left. The reason is in arabic and persian...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.