Solved

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

Posted on 2006-07-22
1
247 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
ID: 17161472

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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