FPMI Multi-Monitor Window Placement

I would like to display the FPMI runtime on a 6 screen multi-monitor PC that has been defined in Windows as one contiguous logical monitor. Another application is using screen locations 1-4, and I need FPMI to use screen locations 5-6. On a two monitor setup as I have described, there would typically be one “child” window for each physical monitor.

Ideally each window should display without title bars (maximized to the physical monitor it is directed to).

Any ideas would be greatly appreciated.

Ask and you shall receive. Disclaimer: the scripting used here is pretty low-level (read: dangerous), so be careful if experimenting with these techniques.

What you’re going to want to do is to set your FactoryPMI project to start non-maximized and not in full screen mode. You set these settings in the FactoryPMI Gateway Configuration section.

Then you’re going to move/manipulate the actual FactoryPMI Client window using the startup script. The only downfall to this is that while the user is logging in, the application will start up on monitor zero, as the startup script runs after a successful login.

This script shows how to move, resize, and alter the FactoryPMI Client window to remove the Windows border decorations (title bar, resize borders, etc).

[code]import sys
sys.add_package(“com.inductiveautomation.factorypmi.application”)

from com.inductiveautomation.factorypmi.application import FPMIApp
from javax.swing import SwingUtilities

window = SwingUtilities.windowForComponent(FPMIApp.getInstance())

Move the window to 400, 250 (pixels from the upper left corner of monitor zero)

window.setLocation(400,250)

Set the window size to 1024x768

window.setSize(1024, 768)

Remove window decorations

window.dispose()
window.setUndecorated(1)
window.setVisible(1)[/code]

Hope this helps,

Do you want 2 instances of the same project, one maximized on monitor 5 and one on monitor 6? If so the project will need to track which “instance” it is - I’d recommend a DB type SQLTag or using the SQL database. Does this project run on other computers with a more standard monitor configuration?

You probably want to guarantee that Carl’s script only runs on that machine. This post provides a similar example that illustrates using computer or network settings in script. You can also use Client SQLTags.

Nathan - Thanks for the additional info. I am currently in “sales” mode for a long-standing client and wanted to be sure I didn’t overstate IA capabilities for a proposed project. With you, Carl, and Travis to help boot me up, I see it will be hard to overstate!

Thanks again!

no problem - keep 'em coming!