From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Changing monitor resolution programatically using LabVIEW

Code and Documents

Attachment

This is an example of how to use the Win32 SDK functions with Visual Studio 6.0 and LabVIEW 7.0 to programmatically change monitor resolution. The example discovers all the supported resolutions of the graphics card then provides the user a list of resolutions from which to select the desired monitor resolution.

This is also an example of how to pass in a pre-allocated array of clusters from LabVIEW, and manipulate that array inside a .dll. For more information about the Win32 SDK functions used, refer to the Microsoft Developer Network at http://msdn.microsoft.com/default.aspx.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors