[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Left/Right Click

Posted on 1998-10-19
5
Medium Priority
?
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 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