Using it to make my program (building on top of everything that toolkit supplies, and modifying some of the code in the midi listener project), I've encountered a big problem.
I'm trying to display a window to select the devices to use for input and output, and then open the MidiListener window after you select the devices, and if you hit cancel, just close the program.
Note: I don't know much at all about multi-window stuff in C# yet, seeing as I've written very little code in C#.
Here's my main code:
using System; using System.Collections.Generic; using System.Windows.Forms; using Multimedia.Midi.UI;
namespace MidiWatcher { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DeviceDialog dd = new DeviceDialog(); dd.ShowDialog(); // This shows a midi device selection dialogue if (dd.DialogResult == DialogResult.OK) // if they selected midi devices { Form1 form = new Form1(dd.InputDeviceID, dd.OutputDeviceID); // Form1 is the main prog window Application.Run(form); // Causes ObjectDisposedException :S } } } }
|