Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TrayIcon in exe
#1
Hell QM Forum,

I am working on an exe macro that adds an icon to the tray so that if you close it u can reopen it by clicking on the tray icon. What code would I use to completely close my file when they click close on the menu that pops up when you right click? ShutDownProcess win("file name")?
#2
Function open_notepad
Code:
Copy      Help
AddTrayIcon "notepad.exe" "" "open_notepad_lclick" "open_notepad_rclick"
wait -1

Function open_notepad_lclick
Code:
Copy      Help
run "notepad.exe"

Function open_notepad_rclick
Code:
Copy      Help
sel PopupMenu("Close Notepad[]Exit")
,case 1
,clo "Notepad"; err
,
,case 2
,shutdown -6 0 "open_notepad"
#3
Wow thanks alot Gint., this is much better than the code I had already. Big Grin
#4
how would i do this? it does not work on mine i have the newest version, do i need it registerd??? :oops:
#5
Maybe exe cannot find icon file.
To avoid such problems, add icon file to exe. Look here: Custom tray icon in exe


Forum Jump:


Users browsing this thread: 1 Guest(s)