This is a migrated thread and some comments may be shown as answers.

Desktop Alert with Dual Monitors

4 Answers 175 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 10 Oct 2016, 11:41 AM

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

Sort by
0
Accepted
Dimitar
Telerik team
answered on 11 Oct 2016, 08:34 AM
Hi Martin,

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
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Martin
Top achievements
Rank 1
answered on 11 Oct 2016, 04:20 PM

Thanks Dimitar,

So simple yet so effective!

0
Shakti SIngh Dulawat
Top achievements
Rank 1
answered on 02 Nov 2016, 12:09 PM

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();

0
Shakti SIngh Dulawat
Top achievements
Rank 1
answered on 15 Nov 2016, 02:31 PM

I figure out best way and solutions is 

 Screen screen = Screen.FromControl(thisForm); // This form is your current form 
            DesktopAlertManager.Instance.SetActiveScreen(screen);

Tags
DesktopAlert
Asked by
Martin
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Martin
Top achievements
Rank 1
Shakti SIngh Dulawat
Top achievements
Rank 1
Share this question
or