Your question is somewhat misleading. You stated you know how to set screen resolution and what to know physical arrangement. What is physical arrangement any ways? Then you proceeded to clarify your question by asking you want control programmatically what is done manually at Display->Settings. Isn't that the screen resolution and color? what does it have to do with physical arrangements?
As Henry stated, there is no way you can get the "physical" arrangement. period. If you have multi monitor you can check with one First, Second ... display. I am not sure how to get that info, but may graphics adapters display that.
If you simply are trying to set the resolution and color, you stated you know it, but if you need more information look at
Dynamic Screen Resolution[
^]
Changing Screen Orientation Programmatically[
^]