[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Left/Right Click

Posted on 1998-10-19
5
Medium Priority
?
168 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 150 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses

872 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