cmd Key overriding

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)


{

Keys key = keyData & ~(Keys.Shift
Keys.Control);



switch (key)

{

case Keys.D:

if ((keyData & Keys.Control) != 0 && (keyData & Keys.Shift) != 0)

{

if (m_debuggingForm == null)

{

TPSMessageBox.Show(this, "Debug Mode Activated");

m_debuggingForm = new Debugging_Form();

m_debuggingForm.Show();

m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2);

}

else if (m_debuggingForm.IsDisposed)

{

TPSMessageBox.Show(this, "Debug Mode Activated");

m_debuggingForm = new Debugging_Form();

m_debuggingForm.Show();

m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2);

}

else

{

m_debuggingForm.BringToFront();

}

return true;

}

break;

}



return base.ProcessCmdKey(ref msg, keyData);

}

댓글

이 블로그의 인기 게시물

Ubuntu Server에 GitLab 설치 Jenkins BlueOcean 연동 + MSBuild

c# Create Zip File Using 7-zip