FIX: CTRL+C Does Not Copy From a Locked TextBox (216175)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q216175 SYMPTOMS
If a textbox on a form has its Locked property set to True, and the CTRL+C shortcut is used to copy text in the textbox, the selected text will not be copied to the clipboard.
RESOLUTION
To work around this behavior, you must use the textbox's KeyDown event to check for a CTRL+C key combination. If CTRL+C does occur, then you must programatically put the selected text on the clipboard, as follows:
If KeyCode = 67 And Shift = vbCtrlMask Then
Clipboard.Clear
Clipboard.SetText Text1.SelText
End If
See the MORE INFORMATION section below for an example of the workaround.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio 6.0 Service Packs, please see the following articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why 194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
REFERENCES
Online Help for Microsoft Visual Basic, version 6.0
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbClipboard kbVS600sp3fix KB216175 |
---|
|