You can accomplish this task by using property nodes. The two main things you need to do in your program is read the current screen resolution and set the font size accordingly. Below I've described how to carry out these two steps:
1) Programmatically getting the screen resolution: The VIs you will need can be found in the All Functions->Application Control palette. Place down an Open Application Reference.vi and a Property Node and wire them together in that order (this allows the property node to control the local machine). Right click the property and navigate to Properties->Display->Primary Workspace and select it. This property will output the screen resolution in pixel coordinates (you can press Ctrl+H to bring up the context help and hover your cursor over the property to get more information about the format of the output).
2) Programmatically setting the font size of a control: Find the control on the block diagram, right-click it, and select Create->Property Node. Next, you will need to right-click the property in the property node and select the font size property. For a button control, you would select Properties->Boolean Text->Font->Size. You will then need to right-click the property again and select Change to Write (this allows you to set the value rather than read it). Now you can wire up your desired font size to the property.
Once you are able to acquire the screen resolution and set the font size, it is up to you how you choose the font size based on the screen resolution. You could use a simple multiplier or you could use a case structure that assigns font sizes to different ranges of screen resolutions. The choice is up to you! Hopefully, though, this information will put you well on your way.
Regards,
Eric S.
Applications Engineer
National Instruments
E. Sulzer
Applications Engineer
National Instruments