Solved

CTRL-V Problem

Posted on 1998-05-18
4
1,086 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 100 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to compare ms sql hashbytes results within vb6 5 99
Help me. 3 71
Advice in Xamarin 21 109
Zip Folders Using Chilkat Routines 1 78
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

730 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