Solved

drag form by grabbing form or a control (Sticky Form)

Posted on 2006-07-22
1
243 Views
Last Modified: 2010-04-04
Hello,

I want to make my form movable by grabbing the form or one of the controls.

IE: no titlebar
0
Comment
Question by:fibdev
1 Comment
 
LVL 28

Accepted Solution

by:
TName earned 50 total points
Comment Utility

Hi, try this in the form's  (or any of the form's controls) MouseDown procedure (change 'Form1' accordingly):

//if Button=mbLeft then begin   {if the form shouldn't be movable by pressing the right mouse button...}
 ReleaseCapture;
 SendMessage(Form1.Handle, WM_SYSCOMMAND, $F012, 0);
//end;
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now