在面板控件上的标签停靠中,我使用了以下代码:(这是用鼠标指针移动我的面板)
Point m_pntPosPanel = new Point();
private void lblMove_MouseUp(object sender, MouseEventArgs e)
{
pnlCost.Location = new Point(e.X - m_pntPosPanel.X + pnlCosto.Location.X, e.Y - m_pntPosPanel.Y + pnlCosto.Location.Y);
Cursor.Current = Cursors.Default;
m_blnMouseDown = false;
}
private void lblMove_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
m_pntPosPanel.X = e.X;
m_pntPosPanel.Y = e.Y;
Cursor.Current = Cursors.Hand;
m_blnMouseDown = true;
}
}
我该如何移动该面板directional keyboard
?