using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication28
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected override void WndProc(ref Message m)
{
const int WM_CHAR = 0x0102;
const int WM_USER = 0x0400;
const int WM_USER1 = WM_USER + 1;
switch (m.Msg)
{
case WM_USER1:
textBox1.Focus();
IntPtr hwnd = textBox1.Handle;
WinAPI.SendMessage(hwnd, WM_CHAR, (int)m.W