user32 mouse event

BlitzMax Forums/BlitzMax Beginners Area/user32 mouse event

Smokey(Posted 2006) [#1]
Hi

I don't use dll calling so it's there a way to call the user32 and getting the mouse click ?

I found this code but how to get it work in bmax, I did a little search and since I'm not expert in Api

using System;
using System.Runtime.InteropServices;

namespace WinApi
{
  
  public class Mouse
  {
 
            [DllImport("user32.dll")]
            private static extern void mouse_event(UInt32 dwFlags,UInt32 dx,UInt32 dy,UInt32 dwData,IntPtr dwExtraInfo);

            private const UInt32 MouseEventLeftDown = 0x0002;
            private const UInt32 MouseEventLeftUp = 0x0004;
 
            public static void SendDoubleClick()
            {
                mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
                mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
                mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
                mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
            }

    }
}


thanks