Beispiel #1
0
        private void KillMessageBox()
        {
            IntPtr ptr = DllImportUtil.FindWindow(null, WM_Caption);

            if (ptr != IntPtr.Zero)
            {
                DllImportUtil.PostMessage(ptr, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
            }
        }
Beispiel #2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (Handle1 != DllImportUtil.GetForegroundWindow() && bForeground)
     {
         frmShow();
         this.Activate();
         this.TopMost = true;
         DllImportUtil.SetForegroundWindow(Handle1);
         bForeground = false;
     }
 }