While the attached skeleton UI project is not a B4XPages project and it does not detect which screen a form is displayed on, you may find some of the concepts used useful in finding a solution for your situation.
What the project does is loop to show a "ScreenIdentifier" form on each monitor (screen) and asks if the user wants to use that screen. If not, the "ScreenIdentifier" form is shown on the next screen and will keep looping until the user selects the desired screen. The MainForm will be displayed on that screen.
I used this arrangement for an application where I wanted the application's user interface form to be displayed on the primary screen and be able to select the screen on which a second (full screen) form was displayed. In most cases this would be just the second screen (monitor), but in cases where I had two external monitors in addition to the laptop's integrated screen, I wanted to be able to choose between the second or third screen.