How to drag your form when “formBorderStyle” was set “none”?

just use 3-M …

Add 3 events MouseDown – MouseUp & MouseMove.

declare :

Boolean flag;
int x, y;

MouseDown function:

flag = true;
x = e.X;
y = e.Y;

MouseUp function:

flag = false;

MouseMove function:

if (flag)
this.SetDesktopLocation(Cursor.Position.X – x, Cursor.Position.Y – y);

or another solution:

using System.Runtime.InteropServices;

public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;

private static extern int SendMessage(IntPtr hWnd,
int Msg, int wParam, int lParam);
private static extern bool ReleaseCapture();

public Form1()

private void menuStrip1_MouseDown(object sender, MouseEventArgs e)
if (e.Button == MouseButtons.Left)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s