Microsoft KB Archive/35712

= &quot;CLIP: &quot; Clipboard Contents Not Available Across MultiFinder =

Article ID: 35712

Article Last Modified on 11/21/2006



This article was previously published under Q35712



SUMMARY
When you OPEN and write to the &quot;CLIP:&quot; device in a QuickBASIC program, the contents of the clipboard may not be carried over when you switch to another application under Apple MultiFinder.

To ensure that the contents of the clipboard are available across a context switch in MultiFinder, you need to call the ROM trap SystemEdit with the appropriate argument after every Edit operation (including Undo, Cut, Copy, Paste, Clear, or output to the &quot;CLIP:&quot; device name):   Operation   Argument

Undo       0 Cut        2 Copy       3 Paste      4 Clear      5



MORE INFORMATION
The program below calls the SystemEdit ROM trap after copying a sentence into the clipboard. This ensures that the contents of the clipboard are available to other applications when you switch to them under MultiFinder.

The program is as follows: ToolBox &quot;i&quot;        'initialize ToolBox SystemEdit% = &H9C2   'SystemEdit trap word b% = 0   'SystemEdit returns a boolean (b%) that's useless to a              'BASIC program but a dummy value needs to be passed OPEN &quot;clip:&quot; FOR OUTPUT AS #1 PRINT #1, &quot;This goes in the clipboard&quot; CLOSE #1 ToolBox &quot;BQ&quot;, SystemEdit%, 3, b%   IF OSerr& THEN BEEP PRINT &quot;Couldn't Update System Clipboard&quot; ELSE PRINT &quot;System Clipboard updated.&quot; PRINT &quot;You may now switch applications in MultiFinder.&quot; END IF The need to call the SystemEdit ROM trap for applications (such as QuickBASIC) that do not accept suspend/resume events from MultiFinder is documented in &quot;Macintosh Technical Note #180: MultiFinder Miscellanea.&quot; This Note is available from Apple Computer.

Additional query words: MQuickB

Keywords: KB35712

-

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

© Microsoft Corporation. All rights reserved.