We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Keeping popup box open

Thread ID:





28380 Apr 30,2005 12:51 AM UTC May 2,2005 08:35 PM UTC WinForms 3
Tags: Tools
Greg Shomette
Asked On April 30, 2005 12:51 AM UTC

How can I keep the popup box open until the user clicks the enter key? I am using the popupcontrol container and I need to override the normal behavior so that the popup only closes when the enter key or the ok button is pressed. The users want the information in the popup box to be visible when they switch between applications.

Administrator [Syncfusion]
Replied On May 2, 2005 03:17 PM UTC

Hi Greg, Setting PopupControlContainer.IgnoreMouseMessages to true should provide the behavior you described. Regards, Gregory Austin Syncfusion Inc.

Greg Shomette
Replied On May 2, 2005 07:56 PM UTC

Hi Gregory, I had already tried the IgnoreMouseMessages and that works fine as long as I stay within the application; however, when I switch to another application the popup goes away. The users want to be able to switch between applications without the popup dissappearing. I do not know if this is possible or not. >Hi Greg, > > Setting PopupControlContainer.IgnoreMouseMessages to true should provide the behavior you described. > >Regards, >Gregory Austin >Syncfusion Inc.

Administrator [Syncfusion]
Replied On May 2, 2005 08:35 PM UTC

Hi Greg, The best way to keep the popup open would be to handle the Form''s Deactivate event and call Show() on the PopupControlContainer. Calling Show will cause the control to be shown without any of the automatic closing behavior built into ShowPopup. The following code snippet demonstrates this: bool isPopupUp; //You need to set popupLoc yourself whenever you call ShowPopup Point popupLoc; private void Form1_Deactivate(object sender, System.EventArgs e) { this.isPopupUp = this.popupControlContainer1.IsShowing(); if (this.isPopupUp) { this.popupControlContainer1.Show(); } } private void Form1_Activated(object sender, System.EventArgs e) { if (this.isPopupUp) { this.popupControlContainer1.Hide(); this.popupControlContainer1.ShowPopup(this.popupLoc); } this.isPopupUp = false; } This solution does have the drawback of drawing the Popup over other windows, but it will stay open while the Form doesn''t have focus. Please let me know if you have any further questions on this topic. Regards, Gregory Austin Syncfusion Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon