InputPanel

T

Taryon

Hi all!
How can i change values on the inputpanel control?
or. i need to open the input panel when the textbox gets the focus (easy).
but i want that the inputpanel comes with the CAPS clicked. there is a way?

thx in advance!
 
É

éric

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----------------------------------------------------------------
 
T

Taryon

thx. helpful!

éric said:
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 -----------------------------------------------------------------
 

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