473,287 Members | 1,960 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,287 software developers and data experts.

Single click stops double-click working?? Help??

Siv
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.
Nov 21 '05 #1
3 2909
i do exactly what you describe with pretty much all of my listview's, so it
should work. are you using the DoubleClick event? you may also be doing
something wierd inside MyListView_Click that prevents a DoubleClick from
being generated

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
On Error Resume Next
MyButton_Click(sender, e)
End Sub

Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyButton.Click
'do stuff
End Sub

"Siv" wrote:
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.

Nov 21 '05 #2
If you have trouble getting it to work, then try to bubble the event using:

RaiseBubbleEvent(Me, e)
"Dave Cousineau ( Sahuagin )"
<Da*******************@discussions.microsoft.com > skrev i melding
news:C5**********************************@microsof t.com...
i do exactly what you describe with pretty much all of my listview's, so it
should work. are you using the DoubleClick event? you may also be doing
something wierd inside MyListView_Click that prevents a DoubleClick from
being generated

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
On Error Resume Next
MyButton_Click(sender, e)
End Sub

Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyButton.Click
'do stuff
End Sub

"Siv" wrote:
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click
the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession
it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.


Nov 21 '05 #3
Check that "Handles MyListView.DoubleClick" is attached to the appropriate
function decleration. Some versions of the Visual Studio IDE sometimes
creates event handlers without these "Handles" attached, thus the event will
never be called.

Example of usage:

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
MsgBox ("Hello world!")
end sub
"Siv" <ms**********@removeme.sivill.com> skrev i melding
news:up**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click
the listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession
it is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.


Nov 21 '05 #4

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

Similar topics

5
by: sinister | last post by:
The examples in the online manual all seem to use double quotes, e.g. at http://us3.php.net/preg_replace Why? (The behavior is different with single quotes, and presumably simpler to...
12
by: Joshua Beall | last post by:
Hi All, I have heard other people say that PHP can parse double quoted strings (e.g., "Hello, World") faster than it can parse single quoted strings (e.g., 'Hello, World'). This seems backwards...
2
by: girish | last post by:
In my XML document, some node attributes data contains both single quot and double quote characters, such as <input msg="Hello "World", What's up"/>. The double quotes are in form of escape...
4
by: Venkat | last post by:
Hi All, I need to copy strings from a single dimensional array to a double dimensional array. Here is my program. #include <stdio.h> #include <stdlib.h>
5
by: Joel | last post by:
Hi, I incorporated a function in my code that whenever I use a string variable in an sql statement if the string contains a single quote it will encase it in double quotes else single quotes. ...
4
by: Greg | last post by:
I keep getting an error when I have a tick mark in a text value that I am searching for in my XPath Query. Example: <Authors> <Author LastName="O'Donnel"> <Author LastName="Smith">...
2
by: John Dann | last post by:
I'm retrieving some columns from a database with numeric values that fall comfortably within the range of the Single type and I'm tempted to use Single for the relevant column type in the retrieved...
7
by: Tor Aadnevik | last post by:
Hi, I have a problem converting values from Single to double. eg. When the Single value 12.19 is converted to double, the result is 12.1899995803833. Anyone know how to avoid this? Regards...
6
by: R.Biloti | last post by:
Hi folks I wrote the naive program to show up the unit roundoff (machine precision) for single and double precision: #include <stdio.h> int main (void) { double x;
4
by: Justin Fancy | last post by:
Hi everyone, I need to replace all instances of a double quote(") with two single quotes('') in a text file. I already have some replacements of strings going on, but I tried this one, but the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.