I NEED A EXAMPLE WHERE SCREEN RESOLUTION CHANGED EVENT HANDLED

E E Cummings

Total Post:26

Points:182
Posted by  E E Cummings
C# 
C#
 1383  View(s)
Ratings:
Rate this:
Hi Expert,

I need a example where screen resolution changed event handled

Thanks in advance. 
  1. Vijay Shukla

    Post:100

    Points:700
    Re: I need a example where screen resolution changed event handled

    Hey E E Cummings!

    We need to below code for getting the screen resolution changed event
    write this code under the form_Load event:- 
            private void Form1_Load(object sender, EventArgs e)
            {
                        Microsoft.Win32.SystemEvents.DisplaySettingsChanged += new EventHandler(getScreenResolution);
                         //Above line of code event handled with the help of Delegate
            }
           // Below method call when we trying to change the Resolution of our computer screen.
            private void getScreenResolution(object sender, EventArgs e)
            {
                MessageBox.Show("Resolution Changed!");
            }

      Modified On Jul-08-2013 06:10:43 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!