Microsoft KB Archive/33300

= &quot;Illegal Function Call&quot; When GetIcon of Wrong Icon ID =

Article ID: 33300

Article Last Modified on 10/30/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft BASIC Interpreter 3.0 for Macintosh

-



This article was previously published under Q33300



SUMMARY
An &quot;Illegal function call&quot; error is generated on a GetIcon statement if the specified icon ID does not match the actual icon ID that exists in the resource file.

You can perform the following steps to view and/or change the ID number of an icon (where the icon is stored in the resource fork of a file):
 * 1) Run Resedit.
 * 2) Select the file that contains the icon.
 * 3) Display the icon.
 * 4) Select &quot;Get Info&quot; from the File menu (in Resedit).
 * 5) Change the value in the ID field.
 * 6) Close windows in Resedit and save the changes before exiting.

This information applies to Microsoft QuickBASIC Version 1.00, BASIC Compiler Version 1.00, and BASIC Interpreter Version 3.00 for the Apple Macintosh.



MORE INFORMATION
The purpose of the GetIcon routine is to return a handle to a specified icon that is located in a resource file on disk. Once you have established a handle for the icon, you can use other routines to manipulate the icon as an object in the Macintosh heap.

In QuickBASIC, GetIcon is an MBLC routine built into QuickBASIC itself.

In the earlier BASIC Compiler Version 1.00 and BASIC Interpreter Version 3.00, GetIcon is a CODE routine provided in the &quot;ToolLib&quot; LIBRARY file on the BASIC Toolbox disk.

Additional query words: BasicCom MQuickB

Keywords: KB33300

-

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

© Microsoft Corporation. All rights reserved.