Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CTRL-V Problem

Posted on 1998-05-18
4
Medium Priority
?
1,091 Views
Last Modified: 2012-06-21
I am having a problem with pasting text on a RichTextBox when I use CTRL-V.  When I use the shortcut, the copied text is pasted twice.  This is not the case when I use the EditPaste menu.  I tried taking away the "Ctrl+V" shortcut for my mnuEditPaste and CTRL-V worked well.   I assume that with the "Ctrl+V" shortcut included in the EditPaste menu, the paste function is performed twice.  However, without the "Ctrl+V" for the mnuEditPaste, the Edit menu does not look right.  Now the question is how can I paste texts correctly using CTRL-V with "Ctrl+V" still stated in the EditPaste menu? I tried including "Ctrl+V" in the caption but it cannot be aligned with the other keyboard shortcuts.
0
Comment
Question by:wsanchez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
kamall earned 400 total points
ID: 1453490
You can set the KeyPreview property of the form to true, and intercept the Ctrl-V key press in the Form_keyPress event and set the KeyAscii = 0 in the event so that no other code will recognize the Ctrl-V key press. Setting the KeyPreview property of the form to True enables receiving any key press by the form before any other control on the form.
Regards
0
 
LVL 4

Expert Comment

by:yowkee
ID: 1453491
wsanchez,

  What's the code did you put in the mnuEditPaste?
0
 

Author Comment

by:wsanchez
ID: 1453492
Thanks Kamall.
0
 
LVL 7

Expert Comment

by:kamall
ID: 1453493
You are welcome, wsanchez.
For any difficulties, feel free to comment me.
Best regards.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question