Jump to content
The simFlight Network Forums

Recommended Posts

Posted

First, create some constant definition for the PMDG Mouse Click codes: (Put these at the class or form level).

    Const MOUSE_FLAG_RIGHTSINGLE As UInteger = &H80000000UI
    Const MOUSE_FLAG_MIDDLESINGLE As UInteger = &H40000000UI
    Const MOUSE_FLAG_LEFTSINGLE As UInteger = &H20000000UI
    Const MOUSE_FLAG_RIGHTDOUBLE As UInteger = &H10000000UI
    Const MOUSE_FLAG_MIDDLEDOUBLE As UInteger = &H8000000UI
    Const MOUSE_FLAG_LEFTDOUBLE As UInteger = &H4000000UI

Events are also known as 'Controls'. My dll uses the term Control instead of Event.

Use the FSUIPCConnection.SendControlToFS() method to send the control/event ID. There is an Enum called PMDG_737_NGX_Control that you can use instead of calculating the event IDs.

You also need to send a parameter value. For PMDG controls, this is one of the mouse codes above. 

For example, this will simulate a single left mouse click on the left Flight Director switch:

FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_MCP_FD_SWITCH_L, MOUSE_FLAG_LEFTSINGLE)

The control will be sent immediately. There is no need to call Process().

Paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.