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



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

This article was previously published under Q73800

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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbprb KB73800