Microsoft KB Archive/44233

= QuickBASIC Program to Delete Apple Menu from Menu Bar =

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.



Example 1
The following program demonstrates a ToolBox call to delete, then restore the Apple Menu: toolbox &quot;i&quot; menuhandle& = 0 ' Delete Apple Menu: toolbox &quot;lq&quot;, &H949, 1, menuhandle&  ' GetMHandle toolbox &quot;pq&quot;, &H936, 1               ' DeleteMenu toolbox &quot;pq&quot;, &H937                  ' DrawMenuBar PRINT &quot;Notice that the Apple menu is deleted&quot; PRINT &quot;Click the mouse button to continue...&quot; PRINT WHILE MOUSE(0) <> 1 : WEND

' Restore Apple Menu toolbox &quot;pq&quot;, &H935, (menuhandle&), 2 ' InsertMenu toolbox &quot;pq&quot;, &H937                   ' DrawMenuBar PRINT &quot;Presto, its back!&quot; PRINT &quot;Click the mouse to exit&quot; 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 &quot;I&quot; ToolBox &quot;PQ&quot;,ClearMenuBarTrap& ToolBox &quot;PQ&quot;,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

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.