Solved

Left/Right Click

Posted on 1998-10-19
5
146 Views
Last Modified: 2010-04-30
How consider a right-button click as a left-button click (on a filelistbox for example ?) ?
0
Comment
Question by:deha2228
5 Comments
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1440567
You have to use the mousedown event.

Add this code :

   If Button = vbLeftButton Then
      MsgBox "Left button pressed"
   ElseIf Button = vbRightButton Then
      MsgBox "Right button pressed"
   End If

0
 

Author Comment

by:deha2228
ID: 1440568
I know that but I try to choose a file in the filelistbox with the rightbutton, ...
0
 
LVL 14

Expert Comment

by:waty
ID: 1440569
It could be possible by getting the item under the actual mouse position given in the MouseDown event, but why do you want to select with the right click, it is not Windows compliant...
0
 
LVL 1

Expert Comment

by:wford
ID: 1440570
I noted another question on disabling the windows popup on the right click in a file list box, perhaps that solution could be applied? What is you basic problem/requirement ?
0
 

Expert Comment

by:dave_show
ID: 13038959
filelistbox's cannot use mousedown events,

I have found that you can copy filelistbox -> listbox , then use the listbox mousedown event.

Is there a way around this without having to move all those filelistbox names?

please advise
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

864 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now