Board index » cppbuilder » TStatusBar like Caption function

TStatusBar like Caption function

Hi Peter,

Quote
> I want to add new function that the TStatusBar like Caption function of
> Form1 that could be dragged to move Form1 in the screen.

You can tell Windows that the Form is being dragged by using the following
technique...

void __fastcall TForm1::StatusBar1MouseDown(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
{
    ReleaseCapture();
    SNDMSG(Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);      

Quote
}

Good luck!

--------------------------------------
Damon Chandler

http://bcbcaq.freeservers.com
Answers to <Commonly Asked Questions>
52064929

 

Re:TStatusBar like Caption function


Hi,
I have a TStatusBar on the bottom of Form1, and the TStatusBar normally
displays the Hint .
I want to add new function that the TStatusBar like Caption function of
Form1 that could be dragged to move Form1 in the screen.
How to do it? with WinAPI?

Peter

Re:TStatusBar like Caption function


Hi Damon,
This code is so terse and powerful,
Thanks a  lot.

Peter

Other Threads