|
-
Dec 28th, 2000, 04:58 PM
#1
Thread Starter
Hyperactive Member
K, here's my problem.
I have a standard edit menu in my application (Cut, Copy, Paste, etc...) with standard ShortCut keys assigned via the menu editor. When the user presses Ctrl+V to paste text, the application pastes the text twice due to Ctrl+V being a Windows Shortcut and also defined in the menu. This doesn't happen in a normal textbox, but I'm using a Rich Text Box which I can't change. How can I trap and stop one set of "Ctrl+V" so the text is only pasted once? Someone suggested removing the code from behind the menu, but I need the menu to be useable as well...Here is the code I have for the menu item:
Code:
frmMain.ActiveForm.rtbText.SelText = Clipboard.GetText
If you can help me with this, I will be eternally grateful!
TIA!!!
-
Dec 28th, 2000, 05:02 PM
#2
Frenzied Member
Hahum... why don't you just remove the shortcut key???
if you really want to keep it you can maybe intercept the WM_PASTE message but I think that would be too much hassle...
or you can check if the text before the text you're going to paste is the same as the text you're going to paste...
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Dec 28th, 2000, 05:09 PM
#3
Thread Starter
Hyperactive Member
I had thought of that, but I'd like to keep it if only for appearances sake...If no-one can figure this one out, I'll remove the shortcut key...
-
Dec 28th, 2000, 05:17 PM
#4
Frenzied Member
Sure we can figure it out, but it would be alot hassle...
just add some spaces in the caption of the menu and type CTRL+V after it and the appearance problem is gone as well as the programmaticle prob.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|