I'm trying to change the screen resolution in C# (there are already several questions in regards to that on StackOverflow, like this one). I'm following the links that are given with this question, and I'm trying to implement the solution using the ChangeDisplayFunction.
This ChangeDisplayFunction as a field called DEVMODE, but when I use it, it always gives me the error:
The type or namespace name 'DEVMODE' could not be found.
I'm not even doing anything with it. I only initialized the functions from the user32.dll library from which it comes. I declared everything like this:
[DllImport("user32.dll")]
public static extern int ChangeDisplaySettings( ref DEVMODE devMode, int flags);
I'm rather new to C# so I don't know which namespace I should use to resolve this. I've tried googling it and I looked to the documentation from Microsoft but all of the namespaces it mentioned worked.