Microsoft KB Archive/46849

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Microsoft Knowledge Base

During INPUT, CTRL+T Displays Softkeys on Line 25

Last reviewed: January 12, 1995
Article ID: Q46849

SUMMARY

During an INPUT statement, pressing CTRL+T causes a number line to display on line 25 of the screen. These numbers correspond to the softkeys that you can define and label with the KEY statement in Basic. This behavior is not documented and occurs in all screen modes.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b, and to Microsoft Basic PDS Version 7.00.

MORE INFORMATION

To prevent this behavior, you can trap for CTRL+T using the KEY statement. The key combination is trapped during the INPUT statement but is not acted upon until after the INPUT statement is terminated. This delay allows you to trap for the key and simply RETURN from the label.

The following sample code prevents display of the softkey line during the INPUT of the string:

KEY 15, CHR$(&H04) + CHR$(&H14)     'delete these lines
KEY(15) ON                          'to see the softkey
ON KEY(15) GOSUB KeyPressed         'display during input

   PRINT "hit CTRL+T then,"
   PRINT "enter a string"
   INPUT AnyString$

END

KeyPressed:

     RETURN

Additional reference words: QuickBas BasicCom

KBCategory: kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 12, 1995
©1997 Microsoft Corporation. All rights reserved. Legal Notices.