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

Click and Double click events are not fired in listview component in VB.NET

hi,

i have created a sample window aplication in VB.NET.placed a
listview component in the form ,written click and double click event
for list view.But the events are not fired.is there any property to be
set for click event.
Thanks,
Ganesh

Jun 14 '06 #1
5 5142
CT
How did you create the event handling code? Did you create it manually and
if so, did you use the WithEvents statement when declaring the listview and
add the Handles clause to the event handler procedure declarations, or are
you hooking up the event handlers with the AddHandler statement? I guess
what I am asking, is it possible that the event haven't been hooked up to
your event handlers?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
<se*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi,

i have created a sample window aplication in VB.NET.placed a
listview component in the form ,written click and double click event
for list view.But the events are not fired.is there any property to be
set for click event.
Thanks,
Ganesh

Jun 14 '06 #2
hi,

listview is not created manually. Dragged it from the toolbox and
dropped it in the form.
This is the click event code

Private Sub ListView1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ListView1.Click
MsgBox("inside click")
End Sub

Thanks,
Ganesh

Jun 14 '06 #3
CT
Hmm, is the listview empty, and if not, are you clicking on an item or on
the "empty" part of the listview? If the listview is empty, try adding one
or more items using the Items property in the Properties window.

Are you trying to catch a click on an item?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
<se*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi,

listview is not created manually. Dragged it from the toolbox and
dropped it in the form.
This is the click event code

Private Sub ListView1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ListView1.Click
MsgBox("inside click")
End Sub

Thanks,
Ganesh

Jun 14 '06 #4
hi,

i have added some items and when i clicked on top of the item the event
ListView1_SelectedIndexChanged gets fired.whereas the click event is
not fired.

Thanks,
Ganesh

Jun 14 '06 #5
CT
Hmm, I'm no ListView expert, but I believe the ItemSelectionChanged fires
when you click an item. It seems to be generally more useful than
SelectedIndexChanged, because the event handler is passed an instnace of the
ListViewItemSelectionChangedEventArgs class, which you can use to directly
reference the Item that was clicked. I don't know is that is what you're
after?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
<se*********@gmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
hi,

i have added some items and when i clicked on top of the item the event
ListView1_SelectedIndexChanged gets fired.whereas the click event is
not fired.

Thanks,
Ganesh

Jun 14 '06 #6

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

Similar topics

1
by: Sakharam Phapale | last post by:
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private void Button1_MouseUp(Object sender,...
1
by: active | last post by:
I've been working on a problem for a few days now. I do not get a Double-Click event fired for a ListView when I double click. I now find that if I double click with the right button it works OK....
1
by: Tom | last post by:
Hi I have a listview with an event for mousemove and double click. Since implementing a handler for the mousemove event the double click event never gets fired, can anyone tell me how i should...
0
by: Mark | last post by:
Hello, I want to do different actions when clicking then when doubleclicking on an item in the listview. With doubleclicking, clicking events is also fired. How can I avoid doing the 2? Use...
6
by: Sakharam Phapale | last post by:
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As...
3
by: Siv | last post by:
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...
2
by: Siv | last post by:
Hi, I posted earlier in the week and no-one responded so i thought I would try again. My question is: I have a ListView control in a Windows application, currently single clicking a customer...
0
by: obuli | last post by:
In VB.NET Form,i am using Date Time Picker How to fire "Date Time Picker" 's Click and "Double Click" events... It seems these events are not fired.. any one please help me .. thanks in...
9
by: Armando | last post by:
I have an app (A2000) where I am letting the user move an object on the screen. I use the OnClick for a command button event to modify the object's Top (or Left) properties, but you can only click...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.