public void ShowForm()
        {
            // Show the window without activating it (i.e. do not take focus)
            PI.ShowWindow(this.Handle, (short)PI.SW_SHOWNOACTIVATE);
            if (this.formPopupShadow != null)
            {
                _showingPopup = true;
                formPopupShadow.Show2(this);
            }

            //this.Show();
            this.linkedParentControl.Focus();
        }
示例#2
0
        public virtual void Show2(Form parent)
        {
            if (!parent.IsHandleCreated)
            {
                return;
            }
            Rectangle screenRect = parent.Bounds;

            //Show(screenRectOfParent);
            screenRect.X += SHADOW_SIZE;
            screenRect.Y += SHADOW_SIZE;
            Location      = screenRect.Location;
            ClientSize    = screenRect.Size;

            // Show the window without activating it (i.e. do not take focus)
            PI.ShowWindow(this.Handle, (short)PI.SW_SHOWNOACTIVATE);
            //PI.SetWindowPos(parent.Handle, this.Handle, screenRectOfParent.X + SHADOW_SIZE,
            //    screenRectOfParent.Y + SHADOW_SIZE,
            //    screenRectOfParent.Width,
            //    screenRectOfParent.Height,
            //    (short)PI.SW_SHOWNOACTIVATE);
        }