Solved

Left/Right Click

Posted on 1998-10-19
5
145 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

759 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

16 Experts available now in Live!

Get 1:1 Help Now