M.WParam = new IntPtr(2) //set Mouse into titlebar M.Msg = WM_NCLBUTTONDOWN //change message type equal Point vpoint =new point(mouse.X,mouse.Y) Įlse if (vPoint.X >= ClientSize.Width - 5)Įlse if (vPoint.Y = ClientSize.Height - 5) Point vPoint = new Point((int)m.LParam & 0xFFFF, Protected override void WndProc(ref Message m) left mouse button down while the cursor is within the nonclient area of a window left mouse button down while the cursor is in the client area of a window You could use the following code to resize and drag the borderless form: #region const message >Removing the border would probable remove the top strip but the form needs to allow the user to drag the borders to resize it, so the border has to be set to resizable. In other way, you should override the form and the form's paint event. I agree jkforum's point, 'FormborderStyle' is a simple way to remove the title bar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |