Microsoft KB Archive/44232

= QuickBASIC Program to Disable Apple Menu from Menu Bar =

Article ID: 44232

Article Last Modified on 11/21/2006



This article was previously published under Q44232



SUMMARY
The program example shown below demonstrates how to disable the Apple menu on the menu bar from a QuickBASIC program on the Apple Macintosh. The resulting Apple appears as dim gray, making its menu items nonselectable.

This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh.

Code Example
The following program is DIMMENU, which demonstrates the toolbox CALL to disable (dim) the Apple Menu: ' Routine to disable Apple Menu toolbox &quot;i&quot; menuhandle& = 0

' Disable Apple Menu toolbox &quot;lq&quot;, &H949, 1, menuhandle&    ' GetMHandle toolbox &quot;pq&quot;, &H93A, (menuhandle&), 0  ' DisableItem toolbox &quot;pq&quot;, &H937                        ' DrawMenuBar

PRINT &quot;Notice that the Apple menu is dimmed&quot; PRINT &quot;Click the mouse button to continue...&quot; PRINT WHILE MOUSE(0) <> 1 : WEND

' Restore Apple Menu toolbox &quot;pq&quot;, &H939, (menuhandle&), 0  ' EnableItem 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

Additional query words: MQuickB

Keywords: KB44232

-

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

© Microsoft Corporation. All rights reserved.