I have a Windows form which does not have a border, titlebar, menu, etc.. I want the user to be able to hold the CTRL key down, left-click anywhere on my form, and drag it, and have it move. Any idea how to do this? I tried this, but it flickers, a lot:
private void HiddenForm_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
this.SuspendLayout();
Point xy = new Point(this.Location.X + (e.X - this.Location.X), this.Location.Y + (e.Y - this.Location.Y));
this.Location = xy;
this.ResumeLayout(true);
}
}