Hi,
I'm using the radDeskTopAlert for WinForms and it's a very nice control.
However, I'm finding that if I move the client application from monitor 1 to monitor 2 the desktop alerts still popup in the same place on monitor 1.
If I restart the application on Monitor 2 the alerts still appear on Monitor 1.
Is there a way to use X,Y co-ords to get around this problem?
Many Thanks,
Martin.
4 Answers, 1 is accepted
Thank you for writing.
You can use the static DesktopAlertManager class to specify on which screen the alerts will display:
DesktopAlertManager.Instance.SetActiveScreen(Screen.AllScreens[0]);
More information is available here: DesktopAlertManager.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Telerik by Progress
Thanks Dimitar,
So simple yet so effective!
Hello Martin,
Can you please share your code, Since I do not have duel monitor at my side but my customer have so I want to confirm code before check in any thing.
Are you using
DesktopAlertManager.Instance.SetActiveScreen(Screen.AllScreens[0]);
or
DesktopAlertManager.Instance.ActiveScreen(DesktopAlertManager.Instance.ActiveScreen)
RadDesktopAlert popAlert = new RadDesktopAlert();
popAlert.Popup.LocationChanged += Popup_LocationChanged;
//STARTING FORMATTING
popAlert.FixedSize = new Size(350, 110);
popAlert.ContentImage = WiseOption.Properties.Resources.IconTick48;
popAlert.Popup.AlertElement.CaptionElement.TextAndButtonsElement.Font = new Font(popAlert.Popup.AlertElement.CaptionElement.TextAndButtonsElement.Font.FontFamily, (float)15, FontStyle.Bold);
popAlert.Popup.AlertElement.ContentElement.Font = new Font(popAlert.Popup.AlertElement.ContentElement.Font.FontFamily, (float)10, FontStyle.Bold); //Earlier Font is 9.25
popAlert.Popup.AlertElement.CaptionElement.CaptionGrip.GradientStyle = GradientStyles.Solid;
popAlert.Popup.AlertElement.GradientStyle = GradientStyles.Solid;
// END FORMATTING
popAlert.CaptionText = "My Message";
popAlert.ContentText = displayMessage;
popAlert.ScreenPosition = AlertScreenPosition.TopRight;
popAlert.ShowCloseButton = true;
popAlert.ShowOptionsButton = false;
popAlert.ShowPinButton = false;
popAlert.PopupAnimation = true;
popAlert.PopupAnimationDirection = RadDirection.Down;
popAlert.PopupAnimationEasing = RadEasingType.Default;
popAlert.PopupAnimationFrames = 50;
popAlert.AutoClose = true;
popAlert.AutoCloseDelay = 3;
popAlert.FadeAnimationSpeed = 50;
popAlert.Show();
I figure out best way and solutions is
Screen screen = Screen.FromControl(thisForm); // This form is your current form
DesktopAlertManager.Instance.SetActiveScreen(screen);