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.

Receiving filename through VB .net

Featured Replies

How would I write a simple program that retreives the name of the last loaded flight file in VB .net?I've been trying for hours and cannot get past connecting to the simulator.The documentation given for visual basic is quite limited.Thanks!

  • 2 weeks later...

An extremely short version of a program that will receive the FlightLoaded event (Ends after receiving one filename). Didn't try this in VS yet, just copied all the relevant stuff from one of my sources.Imports Microsoft.Flightsimulator.SimConnectModule VBReceiveFilenamePrivate Enum MyEventIDs FlightLoaded = 1End EnumPrivate WithEvents m_SC as SimConnectPrivate m_Bored as Boolean = TruePublic Sub Main() m_SC = New SimConnect("ZZZzzzZZzzZZZzZ", 0, 0, Nothing, 0) m_SC.SubscribeToSystemEvent(MyEventIDs.FlightLoaded, "FlightLoaded") Dim yawn as Integer = 50 While m_Bored m_SC.ReceiveMessage() System.Windows.Forms.Application.DoEvents() System.Threading.Thread.CurrentThread.Sleep(yawn) End While m_SC.Dispose()End SubPrivate Sub m_SC_OnRecvEventFilename(ByVal sender As Microsoft.FlightSimulator.SimConnect.SimConnect, ByVal data As Microsoft.FlightSimulator.SimConnect.SIMCONNECT_RECV_EVENT_FILENAME) Handles m_SC.OnRecvEventFilename Select Case CType(data.uEventID, MyEventIDs) Case MyEventIDs.FlightLoaded MsgBox("Flight loaded: " & data.szFileName) ' This breaks the main loop m_Bored = False End SelectEnd SubEnd Module

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.