怎么做:我在文本框上按"G",我会看到'A'?

Gol*_*old 2 c# compact-framework windows-mobile windows-ce

这该怎么做:

当我按下'G'我的表格中的文本框时,我会看到'A'

在C#代码中(windows-CE或Windows-mobile)

提前致谢

Jua*_*nez 15

    TextBox t = new TextBox();
    t.KeyPress += new KeyPressEventHandler(t_KeyPress);


    void t_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == 'G')
            e.KeyChar = 'A';
    }
Run Code Online (Sandbox Code Playgroud)