public MainForm() { InitializeComponent(); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); ge = new GraphicEngine(new InitializeGraphics().getDevice(this), false); }
public InputToolBox(GraphicEngine GE) { GE_object = GE; try { KeyBoardDevice = new Microsoft.DirectX.DirectInput.Device(SystemGuid.Keyboard); KeyBoardDevice.SetDataFormat(DeviceDataFormat.Keyboard); KeyBoardDevice.Acquire(); MouseDevice = new Device(SystemGuid.Mouse); MouseDevice.SetDataFormat(DeviceDataFormat.Mouse); MouseDevice.Acquire(); } catch (DirectXException ex) { MessageBox.Show(ex.Message, ex.Source); } }