Have not tried it but you could attempt some thing like this:
START CODE-----------------------------------------------------
internal class TextboxOperations
{
#region Win32
API ------------------------------------------------------------
private const byte KEYEVENTF_KEYUP = 0x0002;
private const byte KEYEVENTF_SILENT = 0x0004;
private const byte VK_CONTROL = 0x11;
private const byte VK_Z = 0x5A; //Undo -> Ctrl+Z
private const byte VK_X = 0x58; //Cut -> Ctrl+X
private const byte VK_C = 0x43; //Copy -> Ctrl+C
private const byte VK_V = 0x56; //Paste -> Ctrl+V
[DllImport("Coredll.dll")]
private static extern void keybd_event(byte bVk, byte bScan, uint dwFlags,
uint dwExtraInfo);
#endregion -----------------------------------------------------------------
--
#region Textbox
Operations ---------------------------------------------------
private static void _SimulateKeystrokes(byte bVk)
{
keybd_event(VK_CONTROL, 0, KEYEVENTF_SILENT, 0);
keybd_event(bVk, 0, KEYEVENTF_SILENT, 0);
keybd_event(bVk, 0, KEYEVENTF_KEYUP | KEYEVENTF_SILENT, 0);
keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP | KEYEVENTF_SILENT, 0);
}
internal static void Undo()
{
_SimulateKeystrokes(VK_Z);
}
internal static void Cut()
{
_SimulateKeystrokes(VK_X);
}
END CODE----------------------------------------------------------------