///////////////////////////////////////////////////////////////////////// // NoPrefs.cs // // Written by Terry Jeffress, Century Software // Last modified 13 October 1999 // // Modifies the Edit menu by removing the separator and the commands // used to set preferences and settings. Also sets the User_Modify_Menu // function to remove these items each time TinyTERM redraws the menu // // To remove the preferences and settings menu commands each time a user // runs the TinyTERM emulator, you need to do the following: // // 1. Copy this script to the directory containing the TinyTERM // application // // 2. Choose Preferences from the Edit menu and set the Application // Startup Script to NoPrefs.cs (make sure you click OK) // // To limit a user's ability to access preferences through other // means, you will probably want to do the following: // // 1. Turn off the Ribbon bar and the Session bar // // 2. Save the settings as default.tpx // ////////////////////////////////////////////////////////////////////////// function No_Prefs() { hMenu = GetFrameMenu( Frame ); // set a handle to the menu RemoveMenuItem( GetSubMenu( hMenu, 1 /* Edit menu */ ), 3 /* Separator */, 1024 /* MF_BYPOSITION */ ); RemoveMenuItem( hMenu, 7025 /* Session Preferences */, 0 ); RemoveMenuItem( hMenu, 7027 /* FT Preferences */, 0 ); RemoveMenuItem( hMenu, 7028 /* Preferences */, 0 ); } No_Prefs(); // remove the menu items immediately function User_Modify_Menu() // Runs each time TinyTERM redraws the menu { No_Prefs(); }