I believe you're going to have to do that with an applescript. AFAIK, realbasic lets you check the screen, but not change it.
It's real easy to include an Applescript in your app, though. See the developer's guide. And changing the monitor is trivial in applescript.