Home > DeveloperSection > Forums > I need a example where screen resolution changed event handled
E E Cummings
E E Cummings

Total Post:26

Points:182
Posted on    June-15-2013 12:58 AM

 C# C# 
Ratings:


 1 Reply(s)
 1062  View(s)
Rate this:
Hi Expert,

I need a example where screen resolution changed event handled

Thanks in advance. 


Vijay Shukla

Total Post:100

Points:700
Posted on    July-08-2013 6:06 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick