Example:
function g_OnSystemTrayMenu(X, Y) tblMenu = {};
tblMenu[1] ={}; tblMenu[1].Text = "&New Menu"; tblMenu[1].ID = 100; tblMenu[1].Checked = false; tblMenu[1].Enabled = true; tblMenu[1].SubMenu = {}; tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1"; tblMenu[1].SubMenu[1].ID = 101; tblMenu[1].SubMenu[1].Checked = false; tblMenu[1].SubMenu[1].Enabled = true; tblMenu[1].SubMenu[2] = {}; tblMenu[1].SubMenu[2].Text = "S&ubItem 2"; tblMenu[1].SubMenu[2].ID = 102; tblMenu[1].SubMenu[2].Checked = false; tblMenu[1].SubMenu[2].Enabled = true;
result = Application.ShowPopupMenu(X, Y, tblMenu, TPM_RIGHTALIGN, TPM_BOTTOMALIGN, true, false);
if(result ~= -1)then
Dialog.Message("Menu Item Selected",result);
end end
QueryAllowProjectClose ( )
Called whenever the project is 'told' to close. Using this function, you can control how the user can close the application, such as confirming with the user that they intended to close the application.