bernardsylunar
Programmer
hi everyone...
i'll go straight to the problem. i create a simple intranet e-mail program which we will be using within our company. i am using a listview control to display the message. previously, i used ItemClick procedure to open a certain message. then i added a popup menu so the user would have more options when he/she right-click on the listview control.
-------
here's my code on ItemClick Procedure
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
'function to open the item clicked by the user
If ListView1.ListItems.Count = 0 Then Exit Sub
'function to open a message
OpenMessage
End Sub
Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
popupMenu Menu
End If
End Sub
-------------------------
the problem is when the user right-click on the listview control, the ItemClick procedure is triggered. so, instead of using ItemClick procedure, i shifted to DblClick Procedure to open a certain message. but everytime i double click on the listview control even without pointing at the message listed on it, the DblClick procedure is triggered and the selected message will be opened.
what i want to do is for the DblClick procedure to be triggered only when i double click on the item(s) listed and not when i double click anywhere on the listview control. how can i do that? do i missed some listview procedure or do i have to use any API? pls help..
i hope my explanation is clear.
any help will be greatly appreciated...
thanks in advance.
ynad
----
It is foolish to listen to someone who will not listen to you.
i'll go straight to the problem. i create a simple intranet e-mail program which we will be using within our company. i am using a listview control to display the message. previously, i used ItemClick procedure to open a certain message. then i added a popup menu so the user would have more options when he/she right-click on the listview control.
-------
here's my code on ItemClick Procedure
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
'function to open the item clicked by the user
If ListView1.ListItems.Count = 0 Then Exit Sub
'function to open a message
OpenMessage
End Sub
Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
popupMenu Menu
End If
End Sub
-------------------------
the problem is when the user right-click on the listview control, the ItemClick procedure is triggered. so, instead of using ItemClick procedure, i shifted to DblClick Procedure to open a certain message. but everytime i double click on the listview control even without pointing at the message listed on it, the DblClick procedure is triggered and the selected message will be opened.
what i want to do is for the DblClick procedure to be triggered only when i double click on the item(s) listed and not when i double click anywhere on the listview control. how can i do that? do i missed some listview procedure or do i have to use any API? pls help..
i hope my explanation is clear.
any help will be greatly appreciated...
thanks in advance.
ynad
----
It is foolish to listen to someone who will not listen to you.