// show the button config form. public static void ShowButtonConfigForm() { if (configform.IsDisposed) { configform = new Frm_ButtonConfig(); } configform.Start(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); mainform = new Frm_MJOY_Main(); // the action overlay is the overlay which shows the virtual keyboard. VKoverlay = new actionoverlay(); // set actionoverlay position foreach (var scrn in Screen.AllScreens) { if (scrn.Bounds.Contains(VKoverlay.Location)) { VKoverlay.Location = new Point(scrn.Bounds.Right - VKoverlay.Width, scrn.Bounds.Top); break; } } // set the overlay forms properties. // 0.7.2 //VKoverlay.BackColor = System.Drawing.Color.White; //VKoverlay.TransparencyKey = System.Drawing.Color.White; VKoverlay.Show(); // we need to show it here else it will // not show up at all. VKoverlay.TopMost = true; VKoverlay.Hide(); // this is the main poller for the controls. controlpoller = new XInputController(mainform); // create an about form aboutform = new Frm_About(); aboutform.Text = aboutform.Text + " v" + Application.ProductVersion; aboutform.Hide(); // create a config form. configform = new Frm_ButtonConfig(); configform.Hide(); Log.Line("Startup config 2: " + Properties.Settings.Default.StartupConfig); Running = true; Application.Run(mainform); }