471,325 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

TextBox Paste event

How do i Capture the Text box Paste event
From the Builtin Context Menu of textbox control

Or do i need to replace the default context menu

TIA
Dave
Jun 27 '08 #1
2 5164
On Apr 28, 10:49*am, "DaveL" <dvs_...@sbcglobal.netwrote:
How do i Capture the Text box Paste event
From the Builtin Context Menu of textbox control

Or do i need to replace the default context menu

TIA
Dave
TextBox.TextChanged maybe?
Jun 27 '08 #2
Here is What i Ended up doing....
I needed Clipboard contents before the textbox got ahold of it...to send it
out the com Port
just Inherited Textbox and it worked gr8

DaveL

public class testTextBox:TextBox

{
public MyComClass oCom;
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case Win32Constants.WM_PASTE
if (Clipboard.containsText()==true &&
oCom.IsComportOpen())
{
//send out the comport
this.oCom.ComPutString(Clipboard.GetText(),true);
//continue on its merry way to the textbox
base.wndProc(ref m);
}

default:
base.wndProc(ref m);
break;
}
}
}
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Tamir Khason | last post: by
6 posts views Thread by Altramagnus | last post: by
4 posts views Thread by Dabbler | last post: by
10 posts views Thread by garyusenet | last post: by
5 posts views Thread by =?Utf-8?B?QmVuIFIu?= | last post: by
2 posts views Thread by jd | last post: by
reply views Thread by rosydwin | last post: by

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.