Windows窗体keyup事件无法正常工作c

时间:2017-06-08 13:39:52

标签: c# .net

此代码无法以我的主窗体

运行
void main_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
    {
        if (e.KeyCode == Keys.Enter)
        {
            MessageBox.Show("Enter key pressed");


             e.SuppressKeyPress = true;
        }
    }

1 个答案:

答案 0 :(得分:3)

尝试设置Form属性:select client_id, max(case when rn = 2 then date end) as previous_date, max(case when rn = 1 then date end) as last_date from ( select client_id, date, dense_rank() over (partition by client_id order by date desc) as rn from mytable ) group by client_id having max(rn) > 1;