PRB: Edit Menu Commands Have No Effect on Properties Bar Text

Last reviewed: June 21, 1995
Article ID: Q73800
The information in this article applies to:
  • Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0
  • Microsoft Visual Basic programming system for Windows, version 1.0

SYMPTOMS

The Edit menu commands (such as Cut, Copy, Paste, and Undo) have no effect when applied to selected text in the Properties Bar entry window.

CAUSE

The Properties Bar entry window was not designed to handle the Edit menu commands (such as Cut, Copy, Paste, and Undo). The Edit menu commands affect the controls on the form, not the Properties Bar entry window even if you first select text in the Properties Bar entry window before choosing the Edit menu with the mouse.

RESOLUTION

Instead of choosing Edit commands with the mouse, select the desired text in the Properties Bar entry window and use the Edit shortcut keys, as follows:

Command    Shortcut Keys

Cut        SHIFT+DELETE
Copy       CTRL+INSERT
Paste      SHIFT+INSERT
Undo       ALT+BACKSPACE

NOTE: NUM LOCK needs to be off if you select the DELETE or INSERT key from the numeric keypad.

For example, select text in the Properties Bar entry window. Then press CTRL+INSERT (while NUM LOCK is off) to copy text to the Clipboard. Press SHIFT+INSERT to paste clipboard text into the Properties Bar entry window. Press ALT+BACKSPACE to undo a cut, copy, or paste.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Visual Basic.

  2. From the File menu, choose New Project.

  3. Double-click a label box from the Toolbox (symbolized by a capital A in script). This should display a label box on the form.

  4. With the mouse, select the text fragment "Lab" from the "Label1" Caption in the Properties Bar entry window, and choose Copy from the Edit menu.

    NOTE: While you may have thought you just copied "Lab" into the Clipboard, you actually copied the entire Label1 control (from the form) into the Clipboard. Clicking the Edit menu anywhere outside the Properties Bar entry window causes the focus to revert back to the Label1 control on the form.

  5. Click the "Form1" text appearing in the Properties Bar entry window to set the focus there.

  6. From the Edit menu, choose Paste (again, clicking the Edit menu or anywhere outside the Properties Bar entry window causes the focus to revert back to the Label1 control on the form.) This causes the following message box to appear:

          "You already have a control named 'Label1'. Do you want to
           create a control array?".
    

    Select either the Yes or No command button. Notice that another copy of the Label1 box will appear in the upper left corner of the form.


Additional reference words: 1.00 2.00 3.00
KBCategory: kbenv kbprg kbprb
KBSubcategory: EnvtDes


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: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.