C++ (Qt)#include <QApplication>#include <QSystemTrayIcon>#include <QMenu>#include <QProcess>#include <QTextCodec> class MyMenu: public QMenu{Q_OBJECTpublic: MyMenu() { addAction( "Командная строка", this, SLOT( startCMD() ) ); addAction( "Блокнот", this, SLOT( startNotepad() ) ); addAction( "Калькулятор", this, SLOT( startCalc() ) ); addSeparator(); addAction( "Закрыть", qApp, SLOT( quit() ) ); }private slots: void startCMD() { QProcess::startDetached( "cmd" ); } void startNotepad() { QProcess::startDetached( "notepad" ); } void startCalc() { QProcess::startDetached( "calc" ); }}; int main(int argc, char *argv[]){ QTextCodec::setCodecForCStrings( QTextCodec :: codecForName( "CP1251" ) ); QApplication a(argc, argv); QSystemTrayIcon systemTrayIcon; MyMenu menu; QPixmap pixmap(16,16); pixmap.fill( Qt::darkRed ); systemTrayIcon.setIcon( QIcon( pixmap ) ); systemTrayIcon.setContextMenu( &menu ); systemTrayIcon.show(); int result = a.exec(); systemTrayIcon.hide(); return result;} #include "main.moc"