[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Paint Above Controls

Posted on 2005-05-02
Medium Priority
Last Modified: 2010-04-05
In my project I am trying to do a kind of transition effect. It goes like this:

1) Some controls are visible on the form
2) I capture an image of the form into a TBitmap
4) A timer paints the image onto the forms canvas every 10 milliseconds, making it slightly smaller each time (revealing more of the new contents of the form)
3) New controls are shown
4) The timer stops painting the image after it has done it 100 times

This works fine except for 2 things:

1) The form flickers a LOT. I have set the forms DoubleBuffered property to true but still it flickers...
2) The image is only painted above descendants of TGraphicControl. Other controls are still visible...

I need a way to solve both of these problems...
Question by:paulb1989

Author Comment

ID: 13909606
Here is the code for the timer that paints on the form:

procedure TfrmDesign.TransTimerTimer(Sender: TObject);

  if Steps <= TransSteps then
    TransTimer.Enabled := False;

    Canvas.CopyRect(Rect(0, 0, ClientWidth, ClientHeight - (Steps * (ClientHeight div TransSteps))), Pic.Canvas, ClientRect);

    TransTimer.Enabled := True;
  end else
    if Assigned(Pic) then
    TransTimer.Enabled := False;
LVL 17

Accepted Solution

mokule earned 500 total points
ID: 13910686
You can put this image on a panel and this panel on top of You form

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 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