Article ID: 39095 - Last Review: January 8, 2003 - Revision: 1.1

How to Pop Up a Desk Accessory from Macintosh QuickBASIC

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q39095
Expand all | Collapse all

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%

APPLIES TO
  • Microsoft QuickBasic Compiler for Macintosh 1.0
Keywords: 
KB39095
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.