Cancel a Double Click Event

Posted on 2007-10-05
Last Modified: 2008-01-09
I have a FarPoint Spread grid on my form and I want it to ignore a double click from a mouse. Unfortunately if I goto the DblClick event there is no Cancel within the event args.
Is there another easy way round this?
Question by:kiranboi
    LVL 14

    Expert Comment

    check if there is any CELLdoubleclick or row double click can disable that...
    LVL 23

    Expert Comment

    by:Ashish Patel
    Try this
    Private Sub FpSpread1_CellDoubleClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellDoubleClick
    If e.ColumnHeader = True Then
    e.Cancel = True
    End If
    End Sub
    LVL 23

    Expert Comment

    by:Ashish Patel
    Please modify according to your needs.

    Author Comment

    there is no CellDoubleClick event. There is a MouseDoubleClick event but, again, it has no e.Cancel property
    LVL 85

    Accepted Solution

    Take a look at the code I supplied here:

    You would be looking for the WM_LBUTTONDBLCLK constant:

        Private Const WM_LBUTTONDBLCLK As Integer = &H203

    So instead of passing in a handle to a Panel you would pass in a handle to your FarPoint Spread grid and change the Select case statement to trap WM_LBUTTONDBLCLK.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    729 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

    20 Experts available now in Live!

    Get 1:1 Help Now