I want tot make an app to stay on the system tray (like my mouse driver, or video card app), and to be able to run from it's icon some kind of menu from where I can choose one option to run some custom Stacks or .exe files. This app it should be something like a startup point for my app.
I tried to make it but for some unknown reason the app behaves strangely.
If I choose close stack in the first place it works like expected, but I can't hide the app from the normal app task bar (the place that displays all running apps). If i choose something else, it restores my stack window and from now on the app in the tray remains locked there, and it even responses to double click, but the menu is no longer visible ,and the app can't be close just by force using Task manager
I tried different things, and I managed to make it behave like I want but not always. Please help me fix it, my limited knowledge about LiveCode debugging it makes me unable to find the real cause for that.
I made an app in Visual Basic .NET that makes all the things I want and it behaves as expected, but I don't want to use a mix of apps, LiveCode is good and stable for what I want to do. (I use 32bit version of Livecode 9.6 (ver.15510) under Windows 10 pro 64bit )
Code: Select all
on statusicondoubleclick
answer "hello"
end statusicondoubleclick
on statusiconmenuPick pItem
switch pItem
case "Proiect"
answer "Proiect"
set the iconic of stack "TrayIcon" to False
Set the statusicon to Empty # Add this to remove the icon from the windows tray
Set the statusicontooltip to empty # Add this to remove the icon from the windows tray
Set the statusiconmenu to empty # Add this to remove the icon from the windows tray
break
case "Util"
answer "Util"
break
case "Ghid"
Lock Screen
answer "Ghid"
break
-- more case statements here
case "Documentatie"
Lock Screen
answer "Documentatie"
break
case "Close"
close this stack
break
end switch
end statusiconmenuPick
command minimizare
//minimizare la pornire
set the iconic of stack "EEB" to True
Set the statusicon to 1017
Set the statusicontooltip to "Electroechipament"
Set the statusiconmenu to "Proiect" & return & "Util" & return & "-" & return & "Ghid" & return & "Documentatie" & return & "-" & return & "Close"
end minimizare
on preOpenStack
minimizare
end preOpenStack