Solved

Change color twice without see the change

Posted on 1998-06-30
4
134 Views
Last Modified: 2010-04-04
Hi

I have a form.panel1.color = clsilver.
i want to print the panel and i have to change the color of the panel in clwhite.

 Form.Panel1.color:=clwhite
 Form.print;
 Form.Panel1.color:=clsilver

But i dont want to the person to see the change of color on the screen.
Is there any method or command to not change the color on screen?

Thanks
0
Comment
Question by:sierra20
4 Comments
 
LVL 1

Expert Comment

by:michaue
Comment Utility
I don't know how to do that exactly, but you can by doing a hide on the form, before the print event, (still having your change panel colour inbetween).

Then design a small form with borderstyle none, to display a message to the user, something like "PLEASE WAIT WHILE THE FORM IS PRINTING".

Change the colour of the panel back and close the second form after the print event and then show the first one ...
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Another way, maybe is this :

Capture the bitmap of the form, do your color manipulations on this one and print the bitmap.

Zif.
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 50 total points
Comment Utility
sierra20

Use the LockWindowUpdate API call to lock the updateing etc...

LockWindowUpdate(Form1.Handle);

Check the help file out for futher usage etc...

Later
BoRiS
0
 

Author Comment

by:sierra20
Comment Utility
Thanks Boris, it was exactly what i was looking for.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now