Jump to content

trayicon context menu


rstolfa
 Share

Recommended Posts

Hello all,

I am trying to setup a GUI-less application that needs a "context menu" from the TrayIcon. Is there a simple code snippit that someone could forward my way?

Thanks in advance,

Roland

See TrayCreateMenu in helpfile. Remember to look at example.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

herte is a format

opt("TrayMenuMode", 1)
opt("TrayOnEventMode", 1)
$upgrade_tray = TrayCreateItem("Visit " & $Company & " On-Line Now!")
TrayItemSetOnEvent(-1, "Set_Update")
TrayCreateItem("")
$hide_tray = TrayCreateItem("Listen to " & $Load)
TrayItemSetOnEvent(-1, "Set_Play")
TrayCreateItem("")
$show_tray = TrayCreateItem("Show  On-Line Radio")
TrayItemSetOnEvent(-1, "Set_Show")
TrayCreateItem("")
$exit_tray = TrayCreateItem("Exit  On-Line Radio")
TrayItemSetOnEvent(-1, "Set_Exit")
TraySetState()

and the functions

Func Set_Update()
    Run(@ComSpec & " /c Start " & $Company_Site, "", @SW_HIDE)
EndFunc  ;==>Set_Update

Func Set_Show()
    GUISetState(@SW_SHOW, $E_Music)
EndFunc  ;==>Set_Show
Func Set_Play()
    $E_Check = 1
EndFunc  ;==>Set_Play
Func Set_Exit()
    SoundSetWaveVolume($save_level)
    Exit
EndFunc  ;==>Set_Exit

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

See TrayCreateMenu in helpfile. Remember to look at example.

Sorry to be a nubie, but which helpfile? The .chm that came with my 3.1.1.0 build doesn't show this as an option. Is there a separate include or some such that I need to use? Any and all assistance you can provide would be greatly appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...