Author Topic: Visio C# DoubleClick  (Read 4097 times)

0 Members and 1 Guest are viewing this topic.

RodrigoCampos

  • Newbie
  • *
  • Posts: 5
Visio C# DoubleClick
« on: March 20, 2012, 06:10:41 AM »
I have implemented double-Click on my Visio C# standalone program using this:

http://www.mikeborozdin.com/post/Handling-the-Double-Click-Event-with-the-Visio-API.aspx

But since I started using mouseUp, it stopped working. Anyone have some C# sample code that can show me how I can use "double mouseUp" to implement doubleClick?Is this possible?

Thank you in advance,
Rodrigo Campos

RodrigoCampos

  • Newbie
  • *
  • Posts: 5
Re: Visio C# DoubleClick
« Reply #1 on: March 22, 2012, 05:08:52 AM »
I found out the solution :)

        private DateTime firstClick = DateTime.Now;

        private void axDrawingControl1_MouseUpEvent(object sender, AxMicrosoft.Office.Interop.VisOcx.EVisOcx_MouseUpEvent e)
        {
            if (DateTime.Now < firstClick.AddMilliseconds(SystemInformation.DoubleClickTime))
            {
                ShapeDoubleClick(sender, e);
            }

            firstClick = DateTime.Now;
        }

Rodrigo