I am using the TrayItem class (https://docs.xojo.com/TrayItem) for Windows 10 target and I am finding weird multiple phantom instances (icons) on the Windows tray. Why I call them phantom is that when you run your mouse over them all of the phantom icon’s go away real quick and the correct trayitem icon remains. It also doesn’t happen every time which is really weird.
App.Open Function:
#If TargetWindows Then
Tray = New AppTrayItem
Tray.Icon = vsRoundLogoWhiteBG2000
Tray.Tooltip = “VS v” + app.MajorVersion.ToString + “.” + app.MinorVersion.ToString + “(” + app.BugVersion.ToString + “)”If Not Self.AddTrayItem(Tray) Then
Call Common.writeLog(System.LogLevelCritical, “VS App.TrayItem failed to instantiate”)
End If#endif
AppTrayItem.Action:
#IF TargetWindows Then
Select Case cause
Case 100,101
// LEFT CLICK
Var trayMenu as New MenuItem
trayMenu.AddMenu(New MenuItem(“VS”))
trayMenu.AddMenu(New MenuItem(“About”))
trayMenu.AddMenu(New MenuItem(“Quit”))// GET RESULTS Var result as New MenuItem result = trayMenu.PopUp If result <> NIl Then Select Case result.Text Case "VS" adminToolKit_Window.Show() Case "About" AboutWindow.Show() Case "Quit" quit End Select End If
End Select
#ENDIF
Thanks in advance.
Mike