Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Change color twice without see the change

Posted on 1998-06-30
4
137 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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