using System.Windows.Forms; using System.Drawing; namespace PleoLab { public partial class ToolHelpForm : Form { public ToolHelpForm(Point _parentWindowPosition) { InitializeComponent(); this.Location = new Point(_parentWindowPosition.X - Width / 2, _parentWindowPosition.Y - Height / 2); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { this.Close(); return true; } return base.ProcessCmdKey(ref msg, keyData); } } }