Inheritance: System.Windows.Forms.Form
Ejemplo n.º 1
0
        public ToolForm()
        {
            InitializeComponent();

            SetProcessDPIAware();

            Config.SyncSettings();

            try
            {
                magicBox = new MagicBox();
            }
            catch (Exception ex)
            {
                magicBox = null;
            }

            Hotkey hk = new Hotkey();

            hk.KeyCode = Keys.F2;
            hk.Windows = true;

            hk.Pressed += delegate
            {
                showMagicBox();
            };

            hk.Register(this);

            Config.notifyIcon = notifyIcon;
        }
Ejemplo n.º 2
0
        private void showMagicBox()
        {
            if (magicBox == null)
            {
                magicBox = new MagicBox();
            }

            magicBox.Show();
            magicBox.TopMost = true;
            magicBox.Focus();
            magicBox.BringToFront();
            magicBox.TopMost = false;
            magicBox.Activate();
        }