Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I need a Floating Panel

409 views
Skip to first unread message

John Francis Lundy

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to
Is there such a thing as a floating panel in d4/d5.

I need a panel that I can make visible/invisible on a buton click and will
float/drag on a screen form.

Thanks.

Larry J. Rutledge

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to
John,

In order to make any TWinControl draggable at run-time, you need to use
a special Windows message whose value is $F012. Following is a snippet
of code to demonstrate how to use this. Start a new application and drop
a TPanel on the form. Then in the panel's OnMouseDown event enter the
following code:

procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
SC_DRAGMOVE = $F012;

begin
if Button = mbLeft then
begin
SetCaptureControl(nil);
TPanel(Sender).Perform(WM_SYSCOMMAND, SC_DRAGMOVE, 0);
end;
end;

Now run the application and use the left mouse button to click and drag
the panel.

Hope this helps,
Larry

--

Larry J. Rutledge
la...@prestwood.com

Programmer / Analyst
Prestwood Software & Consulting
7525 Auburn Blvd., #8
Citrus Heights, CA 95610

Office: 1 (916) 726-5675 x214
Fax: 1 (916) 726-5676

http://prestwood.net - Business Site
http://prestwood.com - FREE world wide internet environment

larry.vcf

Martijn Tonies

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to
this doesn't work with Windows NT

--

Martijn Tonies
Upscene Productions

For Delphi Components and InterBase tools:
http://www.upscene.com

"Larry J. Rutledge" <la...@prestwood.com> wrote in message
news:38971830...@prestwood.com...

John Francis Lundy

unread,
Feb 2, 2000, 3:00:00 AM2/2/00
to
Thanks Larry. I'll try it out.

I've also came across this statement which may help

var ScreenPos: TRect;
begin
Panel.borderstyle := bsNone;
screenpos := rect(5, 194, 771, 361);
Panel.ManualFloat(screenpos);
Panel.visible := false;

John Francis Lundy

unread,
Feb 5, 2000, 3:00:00 AM2/5/00
to
Thanks Larry that was just what was required.


"John Francis Lundy" <jfl...@tamesystems.com> wrote in message
news:879dn9$26...@bornews.borland.com...

0 new messages