Click here to Skip to main content
15,889,627 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to minimize windows form to system tray ??
Posted
Comments
OriginalGriff 14-May-11 10:10am    
.NET or MFC?

If it's MFC (or otherwise un-managed code), you can minimize an application's main window, but not a form, to the system tray. If you're talking about .Net, you have to enable the control box that contains the various window control buttons (minimize, normalize, close), which should be enabled by default for all forms.
 
Share this answer
 
trayicon = QtGui.QSystemTrayIcon(QtGui.QIcon("Bomb.ico"),app)
menu = QtGui.QMenu()
exit = menu.addAction("Exit")
menu.addAction("open")
menu.addSeparator()
menu.addAction("update")
trayicon.setContextMenu(menu)
trayicon.show()
trayicon.connect(exit,QtCore.SIGNAL('triggered()'),sys.exit)
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900