TextBox Paste event

D

DaveL

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
 
Z

zacks

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?
 
D

DaveL

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;
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top