Solved

Change color twice without see the change

Posted on 1998-06-30
4
136 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
ID: 1356721
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
ID: 1356722
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
ID: 1356723
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
ID: 1356724
Thanks Boris, it was exactly what i was looking for.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 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