473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Paste event in control library with rich text box

I have created a control with a rich text box, and I need to capture
the paste event to do some additional work when a user pastes text. I
can't do this on hte text change because Someone could possibly paste
an enormous amount of data and slow the program down too much. I have
the following code that catches other events on the control but not the
WM_PASTE. If the WM_PASTE is not raised on the Rich Text box where can
I catch it? I tried similiar code in the control class but it didn't
work there either.

protected override void WndProc(ref Message m)
{
int i = 0;

switch (m.Msg)
{
case (int) WndProcHandler.WINDOWSMSGENUM.WM_CREATE :

i = i + 5;
break;

case (int) WndProcHandler.WINDOWSMSGENUM.WM_PASTE:
i = i + 1;

break;
}

base.WndProc(ref m);
}

}

Feb 11 '06 #1
0 1482

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: chirs | last post by:
I have a code to disable ctrl-v (paste) on the 2nd box. The problem is that when I type ctrl-v, the text shows, then disappear after I release ctrl-v. How can I make it not to show in the box. In...
14
by: Seth Russell | last post by:
I'm running Kevin Roth's rte box and i want to deactivate the ability to past inside the box. People sometimes paste outrageous things in there that might break my site. How can I deactivate the...
3
by: Richard Price | last post by:
Please can someone help me out I am really stuck. I am building a website and have been told to build into it an HTML page which has a text box and a button to set the text to bold or underline....
4
by: Rich | last post by:
Hello, I create multiple pictureboxe controls on a form in a For Loop and display thumbnail pictures. I need to add a Click event to these pictureboxes. Here is the routine that creates the...
7
by: Rich Milburn [MVP] | last post by:
Ok I am not a programmer, I copied some code and very painfully got it working in VB6. I can adjust the volume with waveOutSetVolume on winmm.dll. But I could not seem to be able to figure out how...
8
by: michael sorens | last post by:
I have searched through the MSDN documentation but without success for this very common task: implementing Ctrl-C, Ctrl-V, and Ctrl-X for any of a number of TextBox controls on a form. Roughly it...
6
by: Ben R. | last post by:
Hi, I've got a vb.net winforms app. Out of the box, I can use Ctrl X, C and V as expected in controls like textboxes. I've got a menustrip, and if I click the link "Add standard items" which...
17
by: Steve | last post by:
I'm trying to code cut, copy, and paste in vb 2005 so that when the user clicks on a toolbar button, the cut/copy/paste will work with whatever textbox the cursor is current located in (I have...
2
arnabc
by: arnabc | last post by:
Hi all, I am developing one online forum kind of website where users have the facility to submit there comments and to do that we r using one custom made rich text editor. So far it was fine but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.