Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Translating samples to C#

Featured Replies

I would like to know if somebody has the C# version of some C++ samples of SimConnect SDK. I got to translate some samples to C#, but the Throttle Control is more complex to me...The tutorials of NotASenator where very important to understand a lot of concepts related to the C# interface of SimConnect. It seems the next one (Part 5) will deal with some details of Throttle Control C++ example.RegardsRodrigo

I've been tinkering a little bit with SimConnect in C#, so I decided to take up this example.I had to get a little creative with some SimConnect calls because in C# you have to use all method parameters, whereas in C++ you can omit them and use the default parameter values.The C++ example maps event IDs to the down keypress events, and by omitting parameters, ignores the up keypress events. But, I couldn't do that, so I had to create another key event to map the up-key events. This is explained a little bit in the commentary in my code.The C++ example uses the A and Z keys to control the throttle, but I used the Q and Z keys instead. This is because the A key was also changing the current view, which made testing a bit difficult.I hope that my example is helpful to you. You may need to respecify the location of the SimConnect Reference in the Visual Studio IDE.Good luck!Johnhttp://forums.avsim.net/user_files/176646.zip

Thank you, John! It was very useful. If you have other sample codes, please share them.RegardsRodrigo

Thanks a lot for this. Is it just me, or is finding C# examples for simconnect difficult? Is there a place specfically for C# simconnect examples? If not, this or one like it would be helpful to a lot of users. Besides us few, is there any interest in sharing C# examples? Reply if so, we can all help each other out.Kranky

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.