We need to below code for getting the screenresolution 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!"); }
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers