Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DBGrid  VB6 - Can I select a row with a right click?

Posted on 2003-02-23
2
Medium Priority
?
317 Views
Last Modified: 2012-06-27
I have a DBGrid and when I right click on one of the rows a popup menu is displayed. My problem is that I am not able to set the current active row with a right click. Currenltly, I first have to left click on a row (select it first)and then do  a right click for the popup menu.

It would be much easier if I could select the row with the right click and at the same time pop the pop up menu.

Please help
0
Comment
Question by:Dipika
2 Comments
 
LVL 2

Accepted Solution

by:
IeuanJ earned 200 total points
ID: 8007013
Not tested this but you can give it a try.

Private Sub DBGrid1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyRButton Then
    MsgBox "Your Code Here"
  End If
End Sub
0
 

Expert Comment

by:CleanupPing
ID: 8901232
Dipika:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 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…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

572 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