Managed Client Event sample
//
// Respond to Flaps up and down (F5, F6, F7 and F8 keys)
// Respond to Pitot switch (Shift-H)
Kind of a NewBee to C#, But I hae done lots of VB programming... I want to use C#
Using VS 2005, I have finally wired up the form correctly.
Here is the base code hat is spawning the error:
>>Error here protected override void DefWndProc(ref Message m)
{
if (m.Msg == WM_USER_SIMCONNECT)
{
if (simconnect != null)
{
simconnect.ReceiveMessage();
}
}
else
{
base.DefWndProc(ref m);
}
}
When I compile the form, I get this error:
I have all the references:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
// Add these two statements to all SimConnect clients
using Microsoft.FlightSimulator.SimConnect;
using System.Runtime.InteropServices;
Here is the error:
Error 2 'FlightSimTest.Main.DefWndProc(ref System.Windows.Forms.Message)': no suitable method found to override
Any ideas?
Thanks
//
// Respond to Flaps up and down (F5, F6, F7 and F8 keys)
// Respond to Pitot switch (Shift-H)
Kind of a NewBee to C#, But I hae done lots of VB programming... I want to use C#
Using VS 2005, I have finally wired up the form correctly.
Here is the base code hat is spawning the error:
>>Error here protected override void DefWndProc(ref Message m)
{
if (m.Msg == WM_USER_SIMCONNECT)
{
if (simconnect != null)
{
simconnect.ReceiveMessage();
}
}
else
{
base.DefWndProc(ref m);
}
}
When I compile the form, I get this error:
I have all the references:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
// Add these two statements to all SimConnect clients
using Microsoft.FlightSimulator.SimConnect;
using System.Runtime.InteropServices;
Here is the error:
Error 2 'FlightSimTest.Main.DefWndProc(ref System.Windows.Forms.Message)': no suitable method found to override
Any ideas?
Thanks
