OpenLP should remember the settings, so I'm a little unclear why you need to do it programmatically, unless you are randomly changing the resolution each time you start OpenLP?
<br>
There is no way of passing the screen info into OpenLP itself, but these items are stored in the registry for Windows or a config file for Linux. If you are feeling brave you could attempt to modify these (at your own risk) prior to starting OpenLP.