Hide the Close Button

Hi, Is there a way to hide the Close, Restore Down and minimize buttons in the top right corner? Or have a lock on it so only users with a username and password kand close the main screen?

Not sure about the Restore Down and minimize, but you could keep them from exiting by using a shutdown-intercept client event script. I would put some further logic in there in order to allow someone to close the project though without having to go through task manager.

I gave an answer to a similar question here but don’t have any full code or anything. But actually, @grietveld’s answer above looks better and definitely more supported by IA.

Thanks! Is that all I would have to type in there or is there something else i would need to add to it?

Java can’t prevent the user from killing the client via the task manager, reachable via ctrl-alt-del under all circumstances. If you need this for security, you’ll be disappointed.

I would add in some level of permission check, or if you want a message box you could add that to the script. but that one line will keep it from exiting when the command is received.

I did stumble upon a small issue with this though. When a user is logged out, the exit button is re-enabled. So it isn’t completely fool proof.

Yeah, if its really important you’ll need some other safeguards, something that will lock things down from outside of Ignition. I know such things exist but couldn’t give any recommendations.

But there is no way of hiding these buttons with a rectangle or something?

The only way to somewhat hide them would be to have the client launch in full screen, but Alt F4, ctrl-alt-del, and other keyboard commands are still enabled.
Source: https://docs.inductiveautomation.com/display/DOC79/Launching+Clients#LaunchingClients-FullScreenOption

Those buttons are part of the frame that holds the application, so it wouldn’t be something you could hide behind an object. You would have to edit the properties of that frame.

Okay thanks! I think launching it in full screen should be good enough!

Launching in Full Screen doesn’t seem to hide that idiotic bar (application name, minimize, restore down, exit) in Windows 10 anymore. This is frustrating.

Full screen mode clients work as expected (no title bar) for us on Windows 10 IoT Enterprise LTSB 64-bit without issues. Are you saying this is a problem after a certain Windows 10 update? Or it didn’t work the first time you tried on Windows 10?

I’ve got it FS, no title bar, on 7 Windows 10 boxes… On one newer Zotac Stick PC, I had to install the 1903 update (I think) to get that menu bar to hide. Now, this PC, all updates, I cannot make the bar go away.

Does setting the window size to match monitor resolution in client startup script make any difference?

I put this in the Shutdown-Intercept Client Event Script:

system.gui.messageBox( ‘Closing this application is not allowed’, ‘Cannot Close’ )
event.cancel = 1

Doesn’t stop them from using task manager to kill it but makes it far more likely that the client will be up and running when I need it to be.