日期:2014-05-17 浏览次数:21222 次
private void Form1_keypress(object sender, KeyPressEventArgs e)
{
if (Chr(e.KeyChar)==Keys.Escape.ToString())
{
splitContainer1.SplitterDistance = 220;
控件1.Height = splitContainer1.Panel2.Height;
menuStrip1.Show();
}
}
public static string Chr(int ascii)
{
if (ascii >= 1 && ascii <= 255)
{
ASCIIEncoding asciiEncoding = new ASCIIEncoding();
byte[] byteArray = new byte[] { (byte)ascii };
string str = asciiEncoding.GetString(byteArray);
return (str);
}
else
{
return "1";
}
}