I wrote something that can help you if you are moving Forms by clicking on it, not the captionBar...
if this can help you...
bool draging=false;
bool a=false;
void MoveForm()
{
ReleaseCapture();
SNDMSG( Form1->Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0 );
}
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
draging=true;
a=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift, int X,
int Y)
{
if(a)
{
if(draging)
{
Form1->AlphaBlendValue=127;
MoveForm();
Form1->AlphaBlendValue=255;
}
}
a=false;
}
This, off course, could be written better, but i'm in a hurry... :-)