Microsoft KB Archive/39095

= How to Pop Up a Desk Accessory from Macintosh QuickBASIC =

Article ID: 39095

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q39095



SUMMARY
A Macintosh QuickBASIC program can make a desired desk accessory pop up (as the front-most window) by using the TOOLBOX statement to invoke the OpenDeskAcc ROM trap.

To open a desk accessory with the TOOLBOX trap, OpenDeskAcc, you must pass the desk accessory name beginning with a null (zero-value) byte, i.e., CHR$(0), as shown below.



MORE INFORMATION
The code example below will pop up the Control Panel desk accessory from a QuickBASIC program. Changes that you make in the Control Panel settings are retained after termination of the program. All currently-installed Macintosh desk accessories can be popped up in this manner.

The desk accessories are located in the Apple menu in the upper left corner of the Macintosh Desktop. You can install/un-install desk accessories with the Font/DA Mover program provided on most Apple System disks. Common desk accessories include the Control Panel, Chooser, Scrapbook, and Calculator.

The following is a code example: Toolbox &quot;i&quot; deskacc$ = CHR$(0) + &quot;Control Panel&quot; 'Null byte before name refnum% = 0 Toolbox &quot;WQ&quot;, &H9B6, deskacc$, refnum%

Additional query words: MQuickB

Keywords: KB39095

-

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

© Microsoft Corporation. All rights reserved.