I would like to minimize my FPMI project in code on a button click or menu item selection. Is this possible? I am running a project in full screen mode and allow the user to link to an email page that is opened in a browser window. When I do that the FPMI project is minimized and the user can interact with their email. When they minimize the email, then they have no way to get back to it again without using windows controls. I would like to allow them to minimize the project, which would display their email browser again.
There aren’t any built-in controls to switch between various window states (full-screen, normal, minimized, etc), but like so many things, you should be able to do this with some clever scripting.
[code]from javax.swing import JFrame
from javax.swing import SwingUtilities
from java.awt import GraphicsEnvironment
That works great Carl, but when I restore the window it is no longer in full screen mode. Is it possible to reset it to full screen so when they click on the minimized project, it returns to full screen mode?
Ok, now things get really fun. In order to do this, you add a window listener to the frame that listens for when the frame becomes “deiconified” (restored), and then re-enters fullscreen mode. You only want to add this listener the 1st time you minimize, after that it will stay on the window for the lifetime of the client listening for deiconified events.
[code]from javax.swing import JFrame
from javax.swing import SwingUtilities
from java.awt import GraphicsEnvironment
from java.awt.event import WindowAdapter