private void frmDatabaseNotFound_Activated(object sender, EventArgs e)
 {
     if (!_activated)
     {
         _activated = true;
         Toolkit.ActivateApplication(this.Handle);
         this.Focus();
         if (_installerWindowHandle > 0)
         {
             Toolkit.MinimizeWindow(_installerWindowHandle);
         }
     }
 }
Esempio n. 2
0
        private void showForm(string labelText, bool showCancelButton, IWin32Window owner, bool disableOwner)
        {
            lblText.Text      = labelText;
            btnCancel.Visible = showCancelButton && _worker != null && _worker.WorkerSupportsCancellation;
            this.Cursor       = Cursors.WaitCursor;
            if (owner != null)
            {
                this.Show(owner);
            }
            else
            {
                this.Show();
            }
            DisableOwner = disableOwner;

            this.Refresh();
            Application.DoEvents();
            Toolkit.ActivateApplication(this.Handle);
            timer1.Tick    += new EventHandler(timer1_Tick);
            timer1.Interval = 400;
            timer1.Enabled  = true;
        }