G Gr
G Gr

Reputation: 6090

Windows Forms border and form control

When I use this code to hide the windows border:

this.FormBorderStyle = FormBorderStyle.None;

I loose control of moving it around is there a way to add some code that will allow you to click and drag anywhere within the form itself?

Upvotes: 0

Views: 811

Answers (2)

GETah
GETah

Reputation: 21449

Short answer, no. There is no such thing built-in to WinForms. You will have to add an event handler on the client area and handle the window move yourself. To avoid duplicating answers, I send you back to this post

Upvotes: 1

Steve
Steve

Reputation: 216353

Instead is relatively easy to do with Windows API.
We need to persuade the window manager into believing that we clicked on the caption of the window.
Look at the sample in this project

Upvotes: 0

Related Questions