How to Pop Up a Desk Accessory from Macintosh QuickBASIC (39095)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple 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 "i"
deskacc$ = CHR$(0) + "Control Panel"  'Null byte before name
refnum% = 0
Toolbox "WQ", &H9B6, deskacc$, refnum%

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:KB39095 kbAudDeveloper