Board index » delphi » draw a rect on the top of other components

draw a rect on the top of other components

   i want to add moving/resizing feature to my application. While
moving/resizing i want to show only a rect with new object position/size.
But i can't draw a rect on the top of all other components. Can someone help
me to solve this problem?

thanks in advance.

 

Re:draw a rect on the top of other components


Is

TCanvas.DrawFocusRect(const Rect: TRect);

What you are after? - this won't erase the underlying canvas contents as it
is drawn / resized.

Dave.

Quote
"AKZ" <ki...@freemail.org.mk> wrote in message

news:961usn$74a4@bornews.inprise.com...
Quote
>    i want to add moving/resizing feature to my application. While
> moving/resizing i want to show only a rect with new object position/size.
> But i can't draw a rect on the top of all other components. Can someone
help
> me to solve this problem?

> thanks in advance.

Re:draw a rect on the top of other components


In article <961usn$7...@bornews.inprise.com>, ki...@freemail.org.mk
says...
Quote
>    i want to add moving/resizing feature to my application. While
> moving/resizing i want to show only a rect with new object position/size.
> But i can't draw a rect on the top of all other components. Can someone help
> me to solve this problem?

I've seen this solved by flipping to a mere "picture" of the main form
(obtained using GetFormImage) and doing the {*word*221}-band drawing on that.
--
Neil J. Rubenking
Contributing Technical Editor
PC Magazine

Re:draw a rect on the top of other components


Quote
> I've seen this solved by flipping to a mere "picture" of the main form
> (obtained using GetFormImage) and doing the {*word*221}-band drawing on that.
> Neil J. Rubenking

Too bad GetFormImage() fails to capture many controls correctly,
else that might actually work<g>

Try it with a combobox, and see if the text shows up...

Re:draw a rect on the top of other components


Use GetDesktopWindow to get a DC, and draw your rectangle to that.

- D

Quote
"AKZ" <ki...@freemail.org.mk> wrote in message

news:961usn$74a4@bornews.inprise.com...
Quote
>    i want to add moving/resizing feature to my application. While
> moving/resizing i want to show only a rect with new object position/size.
> But i can't draw a rect on the top of all other components. Can someone
help
> me to solve this problem?

> thanks in advance.

Re:draw a rect on the top of other components


In article <3a8819a6_2@dnews>, joehe...@code4sale.com says...

Quote

> Too bad GetFormImage() fails to capture many controls correctly,
> else that might actually work<g>

> Try it with a combobox, and see if the text shows up...

Argh! I didn't know that. It's been years since I thought about that
technique...

--
Neil J. Rubenking
Contributing Technical Editor
PC Magazine

Re:draw a rect on the top of other components


=)

--
http://www.techvette.com - Delphi and Corvette sources
"Neil J. Rubenking" <jrubenki@SPAM-B-G...@mother.com> wrote in message
news:MPG.14f2df426ad749d1989755@newsgroups.borland.com...

Quote
> In article <3a8819a6_2@dnews>, joehe...@code4sale.com says...

> > Too bad GetFormImage() fails to capture many controls correctly,
> > else that might actually work<g>

> > Try it with a combobox, and see if the text shows up...

> Argh! I didn't know that. It's been years since I thought about that
> technique...

> --
> Neil J. Rubenking
> Contributing Technical Editor
> PC Magazine

Other Threads