|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace SuperContextMenu
{
public partial class PopedCotainer : UserControl
{
public PopedCotainer()
{
InitializeComponent();
}
protected override bool ProcessDialogKey(Keys keyData)
{// Alt+F4 is to closing
if ((keyData & Keys.Alt) == Keys.Alt)
if ((keyData & Keys.F4) == Keys.F4)
{
this.Parent.Hide();
return true;
}
if ((keyData & Keys.Enter) == Keys.Enter)
{
if (this.ActiveControl is Button)
{
(this.ActiveControl as Button).PerformClick();
return true;
}
}
return base.ProcessDialogKey(keyData);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.