Article ID: 44233
Article Last Modified on 11/21/2006
This article was previously published under Q44233
SUMMARY
The program examples below demonstrate how to delete the Apple menu from the menu bar in a QuickBASIC program on the Apple Macintosh.
Example 1 deletes only the Apple menu, leaving any other existing menus. Example 2 clears the Apple menu plus all existing menus.
This information applies to Microsoft QuickBASIC Version 1.00 for Apple Macintosh.
MORE INFORMATION
Example 1
The following program demonstrates a ToolBox call to delete, then restore the Apple Menu:
toolbox "i" menuhandle& = 0 ' Delete Apple Menu: toolbox "lq", &H949, 1, menuhandle& ' GetMHandle toolbox "pq", &H936, 1 ' DeleteMenu toolbox "pq", &H937 ' DrawMenuBar PRINT "Notice that the Apple menu is deleted" PRINT "Click the mouse button to continue..." PRINT WHILE MOUSE(0) <> 1 : WEND ' Restore Apple Menu toolbox "pq", &H935, (menuhandle&), 2 ' InsertMenu toolbox "pq", &H937 ' DrawMenuBar PRINT "Presto, its back!" PRINT "Click the mouse to exit" WHILE MOUSE(0) <> 1 : WEND
Example 2
The following code example completely erases (clears) the Apple menu plus all the remaining top menu bar items:
ClearMenuBarTrap& = &HA934 DrawMenuBarTrap& = &HA937 ToolBox "I" ToolBox "PQ",ClearMenuBarTrap& ToolBox "PQ",DrawMenuBarTrap& ' Now, any QuickBASIC MENU definitions can be executed from here on. ' They can be placed in the upper left corner where the Apple ' menu was and stretch across the menu bar.
Additional query words: MQuickB
Keywords: KB44233