LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically resize desktop

I have an anoying problem. My graphincs card is $#!£. Everythime I restart my work laptop I have to reset the screen resolution settings.

Does anyone know:

 

1) How to Set the display resolution of Windows  thriugh LabVIEW?

2) How to select the output device (Monitor, laptop, Laptop & monitor)?

3) How to detect the output device?

 

I need a better machine, I can't have one, so I need to create a VI to make my life easier. Smiley Tongue

 

Cheers

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1 of 3
(2,998 Views)

Hi James W,

 

Thank you for contacting National Instruments. Regarding your query, I think you're going to need to look at the Windows API for most of the details on how to do what you want to do. So far, I have found the following details:

 

1. There is a registry Key that stores the screen resolution, it is located here

HKEY_CURRENT_CONFIG>>System>>CurrentControlSet>>Control>>Video and then drill down from here (I think the large hex value changes between machines).

I can't recommend changing your registry without first backing everything up. You can use the registry VIs within LabVIEW to make this change. 

 

2. I am not sure, I think you will probably need to call some part of the Windows API. I would recommend having a look at MSDN to track this one down. 

 

3. Again, I am not sure. Once you have found the corresponding DLL/Registry Key, you will be able to call them and access them through LabVIEW.

 

I hope this helps,

 

Many thanks,

Message Edited by Andrew McL on 04-19-2010 05:06 AM
Andrew McLennan
Applications Engineer
National Instruments
Message 2 of 3
(2,943 Views)

Thanks Andrew,

 

I was hoping someone might have done this before. Smiley Sad

 

As:

1) the values may change between machines

2) it requires messing with the registry. (Big no no for me)

 

I won't be trying this. but thanks for the pointers.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 3 of 3
(2,926 Views)